gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-59-gbcdf79a


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_18-59-gbcdf79a
Date: Mon, 14 May 2012 15:39:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=bcdf79aea10f3f30817ce0b3e9b29dab435219c6

The branch, master has been updated
       via  bcdf79aea10f3f30817ce0b3e9b29dab435219c6 (commit)
       via  5f904e7b973580bf8653529bf74e74a3003d56cb (commit)
       via  765837de4ad6d2d21adf957296393f4d070ec50c (commit)
       via  31f2be597ac4d6183f57d9df33dc3efa3045102f (commit)
       via  d70975d56d90625eb9697d6e429d2a7d1861062b (commit)
       via  08d3127ac40aeaf2edab5ecbda42d8c1fd6bd395 (commit)
       via  209dfe8079436cbe769f829e11d4dbdfe53de9c5 (commit)
       via  23df538293ea2a9beb9d7499c7f5df6be40dc5e8 (commit)
      from  0b4f25c18755f4c4b984b46f16cfa8e468891469 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bcdf79aea10f3f30817ce0b3e9b29dab435219c6
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon May 14 17:32:37 2012 +0200

    Revert "This patch fixes following kind of issue with automake 1.12" It was 
suggested that this need not to be solved by gnutls.
    
    This reverts commit 30ad4976249aa9e402eb27081ade06928f3066f0.

commit 5f904e7b973580bf8653529bf74e74a3003d56cb
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon May 14 17:27:39 2012 +0200

    Auto-generated texi files were added.

commit 765837de4ad6d2d21adf957296393f4d070ec50c
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon May 14 17:26:30 2012 +0200

    Added URI to the example.

commit 31f2be597ac4d6183f57d9df33dc3efa3045102f
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Fri May 11 22:07:48 2012 +0200

    Added support for the URI type of subject alternative name in certtool.

commit d70975d56d90625eb9697d6e429d2a7d1861062b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed May 9 20:10:35 2012 +0200

    Added the autogen files to git.

commit 08d3127ac40aeaf2edab5ecbda42d8c1fd6bd395
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed May 9 20:09:04 2012 +0200

    Added new functions

commit 209dfe8079436cbe769f829e11d4dbdfe53de9c5
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed May 9 19:53:39 2012 +0200

    Updated libopts

commit 23df538293ea2a9beb9d7499c7f5df6be40dc5e8
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed May 9 19:20:22 2012 +0200

    added new functions

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                         |   18 -
 NEWS                               |    2 +
 README-alpha                       |    2 +-
 configure.ac                       |    5 -
 doc/.gitignore                     |    1 -
 doc/Makefile.am                    |    6 +
 doc/invoke-certtool.texi           |  566 ++++++++++++
 doc/invoke-gnutls-cli-debug.texi   |  144 +++
 doc/invoke-gnutls-cli.texi         |  216 +++++
 doc/invoke-gnutls-serv.texi        |  304 ++++++
 doc/invoke-ocsptool.texi           |  262 ++++++
 doc/invoke-p11tool.texi            |  216 +++++
 doc/invoke-psktool.texi            |  100 ++
 doc/invoke-srptool.texi            |  140 +++
 src/certtool-args.c                | 1783 ++++++++++++++++++++++++++++++++++++
 src/certtool-args.def              |    3 +
 src/certtool-args.h                |  289 ++++++
 src/certtool-cfg.c                 |   61 ++
 src/certtool-cfg.h                 |    1 +
 src/certtool.c                     |   10 +-
 src/cli-args.c                     | 1423 ++++++++++++++++++++++++++++
 src/cli-args.h                     |  255 +++++
 src/cli-debug-args.c               |  549 +++++++++++
 src/cli-debug-args.h               |  189 ++++
 src/libopts/Makefile.am            |   10 +-
 src/libopts/ag-char-map.h          |  535 ++++++++---
 src/libopts/ao-strs.c              |    2 +-
 src/libopts/ao-strs.h              |    2 +-
 src/libopts/autoopts.c             |   19 +-
 src/libopts/autoopts.h             |   17 +-
 src/libopts/autoopts/options.h     |   81 ++-
 src/libopts/autoopts/project.h     |    4 +-
 src/libopts/autoopts/usage-txt.h   |  320 ++++----
 src/libopts/boolean.c              |   14 +-
 src/libopts/check.c                |   32 +-
 src/libopts/compat/compat.h        |   19 +-
 src/libopts/compat/pathfind.c      |    4 +-
 src/libopts/configfile.c           |  108 ++-
 src/libopts/cook.c                 |   16 +-
 src/libopts/enum.c                 |   38 +-
 src/libopts/env.c                  |   11 +-
 src/libopts/find.c                 |    8 +-
 src/libopts/genshell.c             |   79 ++-
 src/libopts/genshell.h             |   14 +-
 src/libopts/libopts.c              |    4 +-
 src/libopts/load.c                 |   93 +-
 src/libopts/m4/libopts.m4          |   15 +-
 src/libopts/makeshell.c            |    6 +-
 src/libopts/nested.c               |   13 +-
 src/libopts/parse-duration.c       |    6 +-
 src/libopts/pgusage.c              |   15 +-
 src/libopts/proto.h                |   11 +-
 src/libopts/putshell.c             |   10 +-
 src/libopts/reset.c                |    8 +-
 src/libopts/save.c                 |    6 +-
 src/libopts/stack.c                |   16 +-
 src/libopts/streqvcmp.c            |    6 +-
 src/libopts/tokenize.c             |   16 +-
 src/libopts/usage.c                |   62 +-
 src/libopts/value-type.h           |    2 +-
 src/libopts/xat-attribute.h        |    2 +-
 src/ocsptool-args.c                | 1003 ++++++++++++++++++++
 src/ocsptool-args.h                |  215 +++++
 src/p11tool-args.c                 | 1274 ++++++++++++++++++++++++++
 src/p11tool-args.h                 |  245 +++++
 src/psk-args.c                     |  569 ++++++++++++
 src/psk-args.h                     |  191 ++++
 src/serv-args.c                    | 1398 ++++++++++++++++++++++++++++
 src/serv-args.h                    |  249 +++++
 src/srptool-args.c                 |  631 +++++++++++++
 src/srptool-args.h                 |  199 ++++
 tests/cert-tests/template-test.pem |   19 +-
 72 files changed, 13496 insertions(+), 666 deletions(-)
 create mode 100644 doc/invoke-certtool.texi
 create mode 100644 doc/invoke-gnutls-cli-debug.texi
 create mode 100644 doc/invoke-gnutls-cli.texi
 create mode 100644 doc/invoke-gnutls-serv.texi
 create mode 100644 doc/invoke-ocsptool.texi
 create mode 100644 doc/invoke-p11tool.texi
 create mode 100644 doc/invoke-psktool.texi
 create mode 100644 doc/invoke-srptool.texi
 create mode 100644 src/certtool-args.c
 create mode 100644 src/certtool-args.h
 create mode 100644 src/cli-args.c
 create mode 100644 src/cli-args.h
 create mode 100644 src/cli-debug-args.c
 create mode 100644 src/cli-debug-args.h
 create mode 100644 src/ocsptool-args.c
 create mode 100644 src/ocsptool-args.h
 create mode 100644 src/p11tool-args.c
 create mode 100644 src/p11tool-args.h
 create mode 100644 src/psk-args.c
 create mode 100644 src/psk-args.h
 create mode 100644 src/serv-args.c
 create mode 100644 src/serv-args.h
 create mode 100644 src/srptool-args.c
 create mode 100644 src/srptool-args.h

diff --git a/.gitignore b/.gitignore
index f5dc3a7..fa15564 100644
--- a/.gitignore
+++ b/.gitignore
@@ -444,18 +444,12 @@ src/benchmark
 src/benchmark-cipher
 src/benchmark-tls
 src/certtool
-src/certtool-args.c
-src/certtool-args.h
 src/cfg/Makefile
 src/cfg/Makefile.in
 src/cfg/platon/Makefile
 src/cfg/platon/Makefile.in
 src/cfg/platon/str/Makefile
 src/cfg/platon/str/Makefile.in
-src/cli-args.c
-src/cli-args.h
-src/cli-debug-args.c
-src/cli-debug-args.h
 src/crywrap/crywrap
 src/gaa.skel
 src/gnutls-cli
@@ -471,21 +465,9 @@ src/libcmd-psk.la
 src/libcmd-serv.la
 src/libcmd-srp.la
 src/ocsptool
-src/ocsptool-args.c
-src/ocsptool-args.h
-src/ocsptool-gaa.c
-src/ocsptool-gaa.h
 src/p11tool
-src/p11tool-args.c
-src/p11tool-args.h
-src/psk-args.c
-src/psk-args.h
 src/psktool
-src/serv-args.c
-src/serv-args.h
 src/srptool
-src/srptool-args.c
-src/srptool-args.h
 stamp-h1
 tags
 tests/*/out
diff --git a/NEWS b/NEWS
index f4f0964..4afa452 100644
--- a/NEWS
+++ b/NEWS
@@ -15,11 +15,13 @@ which imports the trusted root CA's from a compile time 
defined location.
 by Alexandre Bique.
 
 ** API and ABI modifications:
+gnutls_pubkey_verify_hash2: Added
 gnutls_certificate_set_x509_system_trust: Added
 gnutls_pkcs11_obj_list_import_url2: Added
 gnutls_x509_trust_list_add_system_trust: Added
 gnutls_x509_trust_list_add_trust_file: Added
 gnutls_x509_trust_list_add_trust_mem: Added
+gnutls_pk_to_sign: Added
 
 
 * Version 3.0.19 (unreleased)
diff --git a/README-alpha b/README-alpha
index 259067d..d6ae3a4 100644
--- a/README-alpha
+++ b/README-alpha
@@ -10,7 +10,7 @@ We require several tools to check out and build the software, 
including:
 - Make <http://www.gnu.org/software/make/>
 - Automake <http://www.gnu.org/software/automake/> (use 1.11.3 or later)
 - Autoconf <http://www.gnu.org/software/autoconf/>
-- Autogen <http://www.gnu.org/software/autogen/> (use 5.15pre15 or later)
+- Autogen <http://www.gnu.org/software/autogen/> (use 5.16 or later)
 - Libtool <http://www.gnu.org/software/libtool/>
 - Gettext <http://www.gnu.org/software/gettext/>
 - Texinfo <http://www.gnu.org/software/texinfo/>
diff --git a/configure.ac b/configure.ac
index 507bdbe..b0fa3ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,11 +36,6 @@ AC_MSG_RESULT([***
 dnl Checks for programs.
 AC_PROG_CC
 AM_PROG_AS
-
-# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
-m4_pattern_allow([AM_PROG_AR])
-AM_PROG_AR
-
 AC_PROG_CXX
 gl_EARLY
 
diff --git a/doc/.gitignore b/doc/.gitignore
index 3af24c1..915c30a 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -30,4 +30,3 @@ alerts.texi
 alert-printlist
 latex/alerts.tex
 latex/functions
-invoke-*.texi
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f92cd0d..e922ed9 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -503,6 +503,7 @@ FUNCS += functions/gnutls_pubkey_encrypt_data
 FUNCS += functions/gnutls_x509_crt_set_pubkey
 FUNCS += functions/gnutls_x509_crq_set_pubkey
 FUNCS += functions/gnutls_pubkey_verify_hash
+FUNCS += functions/gnutls_pubkey_verify_hash2
 FUNCS += functions/gnutls_pubkey_get_verify_algorithm
 FUNCS += functions/gnutls_pubkey_verify_data
 FUNCS += functions/gnutls_pubkey_verify_data2
@@ -621,6 +622,7 @@ FUNCS += functions/gnutls_kx_get_name
 FUNCS += functions/gnutls_certificate_type_get_name
 FUNCS += functions/gnutls_pk_get_name
 FUNCS += functions/gnutls_sign_get_name
+FUNCS += functions/gnutls_pk_to_sign
 FUNCS += functions/gnutls_mac_get_id
 FUNCS += functions/gnutls_compression_get_id
 FUNCS += functions/gnutls_cipher_get_id
@@ -949,6 +951,7 @@ FUNCS += functions/gnutls_pkcs11_token_get_url
 FUNCS += functions/gnutls_pkcs11_token_get_info
 FUNCS += functions/gnutls_pkcs11_token_get_flags
 FUNCS += functions/gnutls_pkcs11_obj_list_import_url
+FUNCS += functions/gnutls_pkcs11_obj_list_import_url2
 FUNCS += functions/gnutls_x509_crt_import_pkcs11
 FUNCS += functions/gnutls_x509_crt_import_pkcs11_url
 FUNCS += functions/gnutls_pkcs11_obj_get_type
@@ -1191,3 +1194,6 @@ FUNCS += functions/gnutls_x509_trust_list_add_named_crt
 FUNCS += functions/gnutls_x509_trust_list_add_crls
 FUNCS += functions/gnutls_x509_trust_list_verify_named_crt
 FUNCS += functions/gnutls_x509_trust_list_verify_crt
+FUNCS += functions/gnutls_x509_trust_list_add_trust_mem
+FUNCS += functions/gnutls_x509_trust_list_add_trust_file
+FUNCS += functions/gnutls_x509_trust_list_add_system_trust
diff --git a/doc/invoke-certtool.texi b/doc/invoke-certtool.texi
new file mode 100644
index 0000000..58b08ab
--- /dev/null
+++ b/doc/invoke-certtool.texi
@@ -0,0 +1,566 @@
address@hidden certtool Invocation
address@hidden Invoking certtool
address@hidden certtool
address@hidden GnuTLS PKCS #11 tool
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-certtool.texi)
+# 
+# It has been AutoGen-ed  May 14, 2012 at 05:26:00 PM by AutoGen 5.16
+# From the definitions    ../src/certtool-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Tool to parse and generate X.509 certificates, requests and private keys.
+It can be used interactively or non interactively by
+specifying the template command line option.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{certtool} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden certtool help/usage (-h)
address@hidden certtool help
+
+This is the automatically generated usage text for certtool.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+certtool - GnuTLS PKCS #11 tool - Ver. @@VERSION@@
+USAGE:  certtool [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]...
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+       --infile=file          Input file
+                                - file must pre-exist
+       --outfile=str          Output file
+   -s, --generate-self-signed  Generate a self-signed certificate
+   -c, --generate-certificate  Generate a signed certificate
+       --generate-proxy       Generates a proxy certificate
+       --generate-crl         Generate a CRL
+   -u, --update-certificate   Update a signed certificate
+   -p, --generate-privkey     Generate a private key
+   -q, --generate-request     Generate a PKCS #10 certificate request
+   -e, --verify-chain         Verify a PEM encoded certificate chain.
+       --verify               Verify a PEM encoded certificate chain using a 
trusted list.
+                                - requires these options:
+                                load-ca-certificate
+       --verify-crl           Verify a CRL using a trusted list.
+                                - requires these options:
+                                load-ca-certificate
+       --generate-dh-params   Generate PKCS #3 encoded Diffie-Hellman 
parameters.
+       --get-dh-params        Get the included PKCS #3 encoded Diffie-Hellman 
parameters.
+       --dh-info              Print information PKCS #3 encoded Diffie-Hellman 
parameters
+       --load-privkey=str     Loads a private key file
+       --load-pubkey=str      Loads a public key file
+       --load-request=file    Loads a certificate request file
+                                - file must pre-exist
+       --load-certificate=str Loads a certificate file
+       --load-ca-privkey=str  Loads the certificate authority's private key 
file
+       --load-ca-certificate=str Loads the certificate authority's certificate 
file
+       --password=str         Password to use
+   -i, --certificate-info     Print information on the given certificate
+       --certificate-pubkey   Print certificate's public key
+       --pgp-certificate-info  Print information on the given OpenPGP 
certificate
+       --pgp-ring-info        Print information on the given OpenPGP keyring 
structure
+   -l, --crl-info             Print information on the given CRL structure
+       --crq-info             Print information on the given certificate 
request
+       --no-crq-extensions    Do not use extensions in certificate requests
+       --p12-info             Print information on a PKCS #12 structure
+       --p7-info              Print information on a PKCS #7 structure
+       --smime-to-p7          Convert S/MIME to PKCS #7 structure
+   -k, --key-info             Print information on a private key
+       --pgp-key-info         Print information on an OpenPGP private key
+       --pubkey-info          Print information on a public key
+       --v1                   Generate an X.509 version 1 certificate (with no 
extensions)
+       --to-p12               Generate a PKCS #12 structure
+                                - requires these options:
+                                load-certificate
+                                load-privkey
+       --to-p8                Generate a PKCS #8 structure
+   -8, --pkcs8                Use PKCS #8 format for private keys
+       --rsa                  Generate RSA key
+       --dsa                  Generate DSA key
+       --ecc                  Generate ECC (ECDSA) key
+       --hash=str             Hash algorithm to use for signing.
+       --inder                Use DER format for input certificates and 
private keys.
+                                - disabled as --no-inder
+       --inraw                This is an alias for 'inder'
+       --outder               Use DER format for output certificates and 
private keys
+                                - disabled as --no-outder
+       --outraw               This is an alias for 'outder'
+       --bits=num             Specify the number of bits for key generate
+       --sec-param=str        Specify the security level [low, legacy, normal, 
high, ultra].
+       --disable-quick-random  No effect
+       --template=file        Template file to use for non-interactive 
operation
+                                - file must pre-exist
+       --pkcs-cipher=str      Cipher to use for PKCS #8 and #12 operations
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+
+Tool to parse and generate X.509 certificates, requests and private keys.
+It can be used interactively or non interactively by specifying the
+template command line option.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden certtool-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden verify-chain}
address@hidden verify-chain option (-e)
address@hidden certtool-verify-chain
+
+This is the ``verify a pem encoded certificate chain.'' option.
+The last certificate in the chain must be a self signed one.
address@hidden verify}
address@hidden verify option
address@hidden certtool-verify
+
+This is the ``verify a pem encoded certificate chain using a trusted list.'' 
option.
+
address@hidden
+This option has some usage constraints.  It:
address@hidden @bullet
address@hidden
+must appear in combination with the following options:
+load-ca-certificate.
address@hidden itemize
+
+The trusted certificate list must be loaded with --load-ca-certificate.
address@hidden verify-crl}
address@hidden verify-crl option
address@hidden certtool-verify-crl
+
+This is the ``verify a crl using a trusted list.'' option.
+
address@hidden
+This option has some usage constraints.  It:
address@hidden @bullet
address@hidden
+must appear in combination with the following options:
+load-ca-certificate.
address@hidden itemize
+
+The trusted certificate list must be loaded with --load-ca-certificate.
address@hidden get-dh-params}
address@hidden get-dh-params option
address@hidden certtool-get-dh-params
+
+This is the ``get the included pkcs #3 encoded diffie-hellman parameters.'' 
option.
+Returns stored DH parameters in GnuTLS. Those parameters are used in the SRP 
protocol. The parameters returned by fresh generation
+are more efficient since GnuTLS 3.0.9.
address@hidden load-privkey}
address@hidden load-privkey option
address@hidden certtool-load-privkey
+
+This is the ``loads a private key file'' option.
+This option takes an argument string.
+This can be either a file or a PKCS #11 URL
address@hidden load-pubkey}
address@hidden load-pubkey option
address@hidden certtool-load-pubkey
+
+This is the ``loads a public key file'' option.
+This option takes an argument string.
+This can be either a file or a PKCS #11 URL
address@hidden load-certificate}
address@hidden load-certificate option
address@hidden certtool-load-certificate
+
+This is the ``loads a certificate file'' option.
+This option takes an argument string.
+This can be either a file or a PKCS #11 URL
address@hidden load-ca-privkey}
address@hidden load-ca-privkey option
address@hidden certtool-load-ca-privkey
+
+This is the ``loads the certificate authority's private key file'' option.
+This option takes an argument string.
+This can be either a file or a PKCS #11 URL
address@hidden load-ca-certificate}
address@hidden load-ca-certificate option
address@hidden certtool-load-ca-certificate
+
+This is the ``loads the certificate authority's certificate file'' option.
+This option takes an argument string.
+This can be either a file or a PKCS #11 URL
address@hidden to-p12}
address@hidden to-p12 option
address@hidden certtool-to-p12
+
+This is the ``generate a pkcs #12 structure'' option.
+
address@hidden
+This option has some usage constraints.  It:
address@hidden @bullet
address@hidden
+must appear in combination with the following options:
+load-certificate, load-privkey.
address@hidden itemize
+
+It requires a certificate, a private key and possibly a CA certificate to be 
specified.
address@hidden hash}
address@hidden hash option
address@hidden certtool-hash
+
+This is the ``hash algorithm to use for signing.'' option.
+This option takes an argument string.
+Available hash functions are SHA1, RMD160, SHA256, SHA384, SHA512.
address@hidden inder}
address@hidden inder option
address@hidden certtool-inder
+
+This is the ``use der format for input certificates and private keys.'' option.
+The input files will be assumed to be in DER or RAW format. 
+Unlike options that in PEM input would allow multiple input data (e.g. 
multiple 
+certificates), when reading in DER format a single data structure is read.
address@hidden inraw}
address@hidden inraw option
address@hidden certtool-inraw
+
+This is an alias for the inder option,
address@hidden inder, the inder option documentation}.
+
address@hidden outder}
address@hidden outder option
address@hidden certtool-outder
+
+This is the ``use der format for output certificates and private keys'' option.
+The output will be in DER or RAW format.
address@hidden outraw}
address@hidden outraw option
address@hidden certtool-outraw
+
+This is an alias for the outder option,
address@hidden outder, the outder option documentation}.
+
address@hidden sec-param}
address@hidden sec-param option
address@hidden certtool-sec-param
+
+This is the ``specify the security level [low, legacy, normal, high, ultra].'' 
option.
+This option takes an argument string @file{Security parameter}.
+This is alternative to the bits option.
address@hidden pkcs-cipher}
address@hidden pkcs-cipher option
address@hidden certtool-pkcs-cipher
+
+This is the ``cipher to use for pkcs #8 and #12 operations'' option.
+This option takes an argument string @file{Cipher}.
+Cipher may be one of 3des, 3des-pkcs12, aes-128, aes-192, aes-256, rc2-40, 
arcfour.
address@hidden exit status}
address@hidden certtool exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden certtool See Also
+    p11tool (1)
+
address@hidden Examples}
address@hidden certtool Examples
address@hidden Generating private keys
+To create an RSA private key, run:
address@hidden
+$ certtool --generate-privkey --outfile key.pem --rsa
address@hidden example
+
+To create a DSA or elliptic curves (ECDSA) private key use the
+above command combined with 'dsa' or 'ecc' options.
+
address@hidden Generating certificate requests
+To create a certificate request (needed when the certificate is  issued  by
+another party), run:
address@hidden
+certtool --generate-request --load-privkey key.pem \
+   --outfile request.pem
address@hidden example
+
+If the private key is stored in a smart card you can generate
+a request by specifying the private key object URL.
address@hidden
+$ ./certtool --generate-request --load-privkey "pkcs11:..." \
+  --load-pubkey "pkcs11:..." --outfile request.pem
address@hidden example
+
+
address@hidden Generating a self-signed certificate
+To create a self signed certificate, use the command:
address@hidden
+$ certtool --generate-privkey --outfile ca-key.pem
+$ certtool --generate-self-signed --load-privkey ca-key.pem \
+   --outfile ca-cert.pem
address@hidden example
+
+Note that a self-signed certificate usually belongs to a certificate
+authority, that signs other certificates.
+
address@hidden Generating a certificate
+To generate a certificate using the previous request, use the command:
address@hidden
+$ certtool --generate-certificate --load-request request.pem \
+   --outfile cert.pem --load-ca-certificate ca-cert.pem \
+   --load-ca-privkey ca-key.pem
address@hidden example
+
+To generate a certificate using the private key only, use the command:
address@hidden
+$ certtool --generate-certificate --load-privkey key.pem \
+   --outfile cert.pem --load-ca-certificate ca-cert.pem \
+   --load-ca-privkey ca-key.pem
address@hidden example
+
address@hidden Certificate information
+To view the certificate information, use:
address@hidden
+$ certtool --certificate-info --infile cert.pem
address@hidden example
+
address@hidden PKCS #12 structure generation
+To generate a PKCS #12 structure using the previous key and certificate,
+use the command:
address@hidden
+$ certtool --load-certificate cert.pem --load-privkey key.pem \
+   --to-p12 --outder --outfile key.p12
address@hidden example
+
+Some tools (reportedly web browsers) have problems with that file
+because it does not contain the CA certificate for the certificate.
+To work around that problem in the tool, you can use the
+--load-ca-certificate parameter as follows:
+
address@hidden
+$ certtool --load-ca-certificate ca.pem \
+  --load-certificate cert.pem --load-privkey key.pem \
+  --to-p12 --outder --outfile key.p12
address@hidden example
+
address@hidden Diffie-Hellman parameter generation
+To generate parameters for Diffie-Hellman key exchange, use the command:
address@hidden
+$ certtool --generate-dh-params --outfile dh.pem --sec-param normal
address@hidden example
+
address@hidden Proxy certificate generation
+Proxy certificate can be used to delegate your credential to a
+temporary, typically short-lived, certificate.  To create one from the
+previously created certificate, first create a temporary key and then
+generate a proxy certificate for it, using the commands:
+
address@hidden
+$ certtool --generate-privkey > proxy-key.pem
+$ certtool --generate-proxy --load-ca-privkey key.pem \
+  --load-privkey proxy-key.pem --load-certificate cert.pem \
+  --outfile proxy-cert.pem
address@hidden example
+
address@hidden Certificate revocation list generation
+To create an empty Certificate Revocation List (CRL) do:
+
address@hidden
+$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem \
+           --load-ca-certificate x509-ca.pem
address@hidden example
+
+To create a CRL that contains some revoked certificates, place the
+certificates in a file and use @code{--load-certificate} as follows:
+
address@hidden
+$ certtool --generate-crl --load-ca-privkey x509-ca-key.pem \
+  --load-ca-certificate x509-ca.pem --load-certificate revoked-certs.pem
address@hidden example
+
+To verify a Certificate Revocation List (CRL) do:
+
address@hidden
+$ certtool --verify-crl --load-ca-certificate x509-ca.pem < crl.pem
address@hidden example
+
address@hidden Files}
address@hidden certtool Files
address@hidden Certtool's template file format
+A template file can be used to avoid the interactive questions of
+certtool. Initially create a file named 'cert.cfg' that contains the 
information
+about the certificate. The template can be used as below:
+
address@hidden
+$ certtool --generate-certificate cert.pem --load-privkey key.pem  \
+   --template cert.cfg \
+   --load-ca-certificate ca-cert.pem --load-ca-privkey ca-key.pem
address@hidden example
+
+An example certtool template file that can be used to generate a certificate
+request or a self signed certificate follows.
+
address@hidden
+# X.509 Certificate options
+#
+# DN options
+
+# The organization of the subject.
+organization = "Koko inc."
+
+# The organizational unit of the subject.
+unit = "sleeping dept."
+
+# The locality of the subject.
+# locality =
+
+# The state of the certificate owner.
+state = "Attiki"
+
+# The country of the subject. Two letter code.
+country = GR
+
+# The common name of the certificate owner.
+cn = "Cindy Lauper"
+
+# A user id of the certificate owner.
+#uid = "clauper"
+
+# Set domain components
+#dc = "name"
+#dc = "domain"
+
+# If the supported DN OIDs are not adequate you can set
+# any OID here.
+# For example set the X.520 Title and the X.520 Pseudonym
+# by using OID and string pairs.
+#dn_oid = 2.5.4.12 Dr. 
+#dn_oid = 2.5.4.65 jackal
+
+# This is deprecated and should not be used in new
+# certificates.
+# pkcs9_email = "none@@none.org"
+
+# The serial number of the certificate
+serial = 007
+
+# In how many days, counting from today, this certificate will expire.
+expiration_days = 700
+
+# X.509 v3 extensions
+
+# A dnsname in case of a WWW server.
+#dns_name = "www.none.org"
+#dns_name = "www.morethanone.org"
+
+# A subject alternative name URI
+#uri = "http://www.example.com";
+
+# An IP address in case of a server.
+#ip_address = "192.168.1.1"
+
+# An email in case of a person
+email = "none@@none.org"
+
+# Challenge password used in certificate requests
+challenge_passwd = 123456
+
+# An URL that has CRLs (certificate revocation lists)
+# available. Needed in CA certificates.
+#crl_dist_points = "http://www.getcrl.crl/getcrl/";
+
+# Whether this is a CA certificate or not
+#ca
+
+# for microsoft smart card logon
+# key_purpose_oid = 1.3.6.1.4.1.311.20.2.2
+
+### Other predefined key purpose OIDs
+
+# Whether this certificate will be used for a TLS client
+#tls_www_client
+
+# Whether this certificate will be used for a TLS server
+#tls_www_server
+
+# Whether this certificate will be used to sign data (needed
+# in TLS DHE ciphersuites).
+signing_key
+
+# Whether this certificate will be used to encrypt data (needed
+# in TLS RSA ciphersuites). Note that it is preferred to use different
+# keys for encryption and signing.
+#encryption_key
+
+# Whether this key will be used to sign other certificates.
+#cert_signing_key
+
+# Whether this key will be used to sign CRLs.
+#crl_signing_key
+
+# Whether this key will be used to sign code.
+#code_signing_key
+
+# Whether this key will be used to sign OCSP data.
+#ocsp_signing_key
+
+# Whether this key will be used for time stamping.
+#time_stamping_key
+
+# Whether this key will be used for IPsec IKE operations.
+#ipsec_ike_key
+
+### end of key purpose OIDs
+
+# When generating a certificate from a certificate
+# request, then honor the extensions stored in the request
+# and store them in the real certificate.
+#honor_crq_extensions
+
+# Path length contraint. Sets the maximum number of
+# certificates that can be used to certify this certificate.
+# (i.e. the certificate chain length)
+#path_len = -1
+#path_len = 2
+
+# OCSP URI
+# ocsp_uri = http://my.ocsp.server/ocsp
+
+# CA issuers URI
+# ca_issuers_uri = http://my.ca.issuer
+
+# Options for proxy certificates
+# proxy_policy_language = 1.3.6.1.5.5.7.21.1
+
+# Options for generating a CRL
+
+# next CRL update will be in 43 days (wow)
+#crl_next_update = 43
+
+# this is the 5th CRL by this CA
+#crl_number = 5
+
address@hidden example
+
+
diff --git a/doc/invoke-gnutls-cli-debug.texi b/doc/invoke-gnutls-cli-debug.texi
new file mode 100644
index 0000000..0c7152a
--- /dev/null
+++ b/doc/invoke-gnutls-cli-debug.texi
@@ -0,0 +1,144 @@
address@hidden gnutls-cli-debug Invocation
address@hidden Invoking gnutls-cli-debug
address@hidden gnutls-cli-debug
address@hidden GnuTLS debug client
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-gnutls-cli-debug.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:11 PM by AutoGen 5.16
+# From the definitions    ../src/cli-debug-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+TLS debug client. It sets up multiple TLS connections to 
+a server and queries its capabilities. It was created to assist in debugging 
+GnuTLS, but it might be useful to extract a TLS server's capabilities.
+It connects to a TLS server, performs tests and print the server's 
+capabilities. If called with the `-v' parameter more checks will be performed.
+Can be used to check for servers with special needs or bugs.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{gnutls-cli-debug} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden gnutls-cli-debug help/usage (-h)
address@hidden gnutls-cli-debug help
+
+This is the automatically generated usage text for gnutls-cli-debug.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+gnutls-cli-debug - GnuTLS debug client - Ver. @@VERSION@@
+USAGE:  gnutls-cli-debug [ -<flag> [<val>] | --<name>address@hidden| @}<val>] 
]... 
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+   -V, --verbose              More verbose output
+                                - may appear multiple times
+   -p, --port=num             The port to connect to
+                                - It must be in the range:
+                                  0 to 65536
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+Operands and options may be intermixed.  They will be reordered.
+
+
+
+TLS debug client.  It sets up multiple TLS connections to a server and
+queries its capabilities.  It was created to assist in debugging GnuTLS,
+but it might be useful to extract a TLS server's capabilities.  It connects
+to a TLS server, performs tests and print the server's capabilities.  If
+called with the `-v' parameter more checks will be performed.  Can be used
+to check for servers with special needs or bugs.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden gnutls-cli-debug-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden exit status}
address@hidden gnutls-cli-debug exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden gnutls-cli-debug See Also
+gnutls-cli(1), gnutls-serv(1)
+
address@hidden Examples}
address@hidden gnutls-cli-debug Examples
address@hidden
+$ ../src/gnutls-cli-debug localhost
+Resolving 'localhost'...
+Connecting to '127.0.0.1:443'...
+Checking for SSL 3.0 support... yes
+Checking whether %COMPAT is required... no
+Checking for TLS 1.0 support... yes
+Checking for TLS 1.1 support... no
+Checking fallback from TLS 1.1 to... TLS 1.0
+Checking for TLS 1.2 support... no
+Checking whether we need to disable TLS 1.0... N/A
+Checking for Safe renegotiation support... yes
+Checking for Safe renegotiation support (SCSV)... yes
+Checking for HTTPS server name... not checked
+Checking for version rollback bug in RSA PMS... no
+Checking for version rollback bug in Client Hello... no
+Checking whether the server ignores the RSA PMS version... no
+Checking whether the server can accept Hello Extensions... yes
+Checking whether the server can accept small records (512 bytes)... yes
+Checking whether the server can accept cipher suites not in SSL 3.0 spec... yes
+Checking whether the server can accept a bogus TLS record version in the 
client hello... yes
+Checking for certificate information... N/A
+Checking for trusted CAs... N/A
+Checking whether the server understands TLS closure alerts... partially
+Checking whether the server supports session resumption... yes
+Checking for export-grade ciphersuite support... no
+Checking RSA-export ciphersuite info... N/A
+Checking for anonymous authentication support... no
+Checking anonymous Diffie-Hellman group info... N/A
+Checking for ephemeral Diffie-Hellman support... no
+Checking ephemeral Diffie-Hellman group info... N/A
+Checking for ephemeral EC Diffie-Hellman support... yes
+Checking ephemeral EC Diffie-Hellman group info...
+ Curve SECP256R1 
+Checking for AES-GCM cipher support... no
+Checking for AES-CBC cipher support... yes
+Checking for CAMELLIA cipher support... no
+Checking for 3DES-CBC cipher support... yes
+Checking for ARCFOUR 128 cipher support... yes
+Checking for ARCFOUR 40 cipher support... no
+Checking for MD5 MAC support... yes
+Checking for SHA1 MAC support... yes
+Checking for SHA256 MAC support... no
+Checking for ZLIB compression support... no
+Checking for max record size... no
+Checking for OpenPGP authentication support... no
address@hidden example
+
diff --git a/doc/invoke-gnutls-cli.texi b/doc/invoke-gnutls-cli.texi
new file mode 100644
index 0000000..e2b7511
--- /dev/null
+++ b/doc/invoke-gnutls-cli.texi
@@ -0,0 +1,216 @@
address@hidden gnutls-cli Invocation
address@hidden Invoking gnutls-cli
address@hidden gnutls-cli
address@hidden GnuTLS client
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-gnutls-cli.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:11 PM by AutoGen 5.16
+# From the definitions    ../src/cli-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Simple client program to set up a TLS connection to some other computer. 
+It sets up a TLS connection and forwards data from the standard input to the 
secured socket and vice versa.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{gnutls-cli} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden gnutls-cli help/usage (-h)
address@hidden gnutls-cli help
+
+This is the automatically generated usage text for gnutls-cli.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+gnutls-cli - GnuTLS client - Ver. @@VERSION@@
+USAGE:  gnutls-cli [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]... 
[hostname]
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+   -V, --verbose              More verbose output
+                                - may appear multiple times
+       --tofu                 Enable trust on first use authentication
+                                - disabled as --no-tofu
+       --ocsp                 Enable OCSP certificate verification
+                                - disabled as --no-ocsp
+   -r, --resume               Establish a session and resume
+   -e, --rehandshake          Establish a session and rehandshake
+       --noticket             Don't accept session tickets
+   -s, --starttls             Connect, establish a plain session and start TLS.
+   -u, --udp                  Use DTLS (datagram TLS) over UDP
+       --mtu=num              Set MTU for datagram TLS
+                                - It must be in the range:
+                                  0 to 17000
+       --crlf                 Send CR LF instead of LF
+       --x509fmtder           Use DER format for certificates to read from
+   -f, --fingerprint          Send the openpgp fingerprint, instead of the key
+       --disable-extensions   Disable all the TLS extensions
+       --print-cert           Print peer's certificate in PEM format
+       --recordsize=num       The maximum record size to advertize
+                                - It must be in the range:
+                                  0 to 4096
+       --priority=str         Priorities string
+       --x509cafile=str       Certificate file or PKCS #11 URL to use
+       --x509crlfile=file     CRL file to use
+                                - file must pre-exist
+       --pgpkeyfile=file      PGP Key file to use
+                                - file must pre-exist
+       --pgpkeyring=file      PGP Key ring file to use
+                                - file must pre-exist
+       --pgpcertfile=file     PGP Public Key (certificate) file to use
+                                - file must pre-exist
+       --x509keyfile=str      X.509 key file or PKCS #11 URL to use
+       --x509certfile=str     X.509 Certificate file or PKCS #11 URL to use
+       --pgpsubkey=str        PGP subkey to use (hex or auto)
+       --srpusername=str      SRP username to use
+       --srppasswd=str        SRP password to use
+       --pskusername=str      PSK username to use
+       --pskkey=str           PSK key (in hex) to use
+   -p, --port=str             The port or service to connect to
+       --insecure             Don't abort program if server certificate can't 
be validated
+       --benchmark-ciphers    Benchmark individual ciphers
+       --benchmark-soft-ciphers  Benchmark individual software ciphers (no hw 
acceleration)
+       --benchmark-tls        Benchmark ciphers and key exchange methods in TLS
+   -l, --list                 Print a list of the supported algorithms and 
modes
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+Operands and options may be intermixed.  They will be reordered.
+
+
+
+Simple client program to set up a TLS connection to some other computer.  It
+sets up a TLS connection and forwards data from the standard input to the
+secured socket and vice versa.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden gnutls-cli-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden tofu}
address@hidden tofu option
address@hidden gnutls-cli-tofu
+
+This is the ``enable trust on first use authentication'' option.
+This option will, in addition to certificate authentication, perform 
authentication based on previously seen public keys, a model similar to SSH 
authentication.
address@hidden ocsp}
address@hidden ocsp option
address@hidden gnutls-cli-ocsp
+
+This is the ``enable ocsp certificate verification'' option.
+This option will enable verification of the peer's certificate using ocsp
address@hidden resume}
address@hidden resume option (-r)
address@hidden gnutls-cli-resume
+
+This is the ``establish a session and resume'' option.
+Connect, establish a session, reconnect and resume.
address@hidden rehandshake}
address@hidden rehandshake option (-e)
address@hidden gnutls-cli-rehandshake
+
+This is the ``establish a session and rehandshake'' option.
+Connect, establish a session and rehandshake immediately.
address@hidden starttls}
address@hidden starttls option (-s)
address@hidden gnutls-cli-starttls
+
+This is the ``connect, establish a plain session and start tls.'' option.
+The TLS session will be initiated when EOF or a SIGALRM is received.
address@hidden priority}
address@hidden priority option
address@hidden gnutls-cli-priority
+
+This is the ``priorities string'' option.
+This option takes an argument string.
+TLS algorithms and protocols to enable. You can
+use predefined sets of ciphersuites such as PERFORMANCE,
+NORMAL, SECURE128, SECURE256.
+
+Check  the  GnuTLS  manual  on  section  ``Priority strings'' for more
+information on allowed keywords
address@hidden list}
address@hidden list option (-l)
address@hidden gnutls-cli-list
+
+This is the ``print a list of the supported algorithms and modes'' option.
+Print a list of the supported algorithms and modes. If a priority string is 
given then only the enabled ciphersuites are shown.
address@hidden exit status}
address@hidden gnutls-cli exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden gnutls-cli See Also
+gnutls-cli-debug(1), gnutls-serv(1)
+
address@hidden Examples}
address@hidden gnutls-cli Examples
address@hidden Connecting using PSK authentication
+To connect to a server using PSK authentication, you need to enable the choice 
of PSK by using a cipher priority parameter such as in the example below. 
address@hidden
+$ ./gnutls-cli -p 5556 localhost --pskusername psk_identity \
+    --pskkey 88f3824b3e5659f52d00e959bacab954b6540344 \
+    --priority NORMAL:-KX-ALL:+ECDHE-PSK:+DHE-PSK:+PSK
+Resolving 'localhost'...
+Connecting to '127.0.0.1:5556'...
+- PSK authentication.
+- Version: TLS1.1
+- Key Exchange: PSK
+- Cipher: AES-128-CBC
+- MAC: SHA1
+- Compression: NULL
+- Handshake was completed
+    
+- Simple Client Mode:
address@hidden example
+By keeping the --pskusername parameter and removing the --pskkey parameter, it 
will query only for the password during the handshake. 
+
address@hidden Listing ciphersuites in a priority string
+To list the ciphersuites in a priority string:
address@hidden
+$ ./gnutls-cli --priority SECURE192 -l
+Cipher suites for SECURE192
+TLS_ECDHE_ECDSA_AES_256_CBC_SHA384         0xc0, 0x24  TLS1.2
+TLS_ECDHE_ECDSA_AES_256_GCM_SHA384         0xc0, 0x2e  TLS1.2
+TLS_ECDHE_RSA_AES_256_GCM_SHA384           0xc0, 0x30  TLS1.2
+TLS_DHE_RSA_AES_256_CBC_SHA256             0x00, 0x6b  TLS1.2
+TLS_DHE_DSS_AES_256_CBC_SHA256             0x00, 0x6a  TLS1.2
+TLS_RSA_AES_256_CBC_SHA256                 0x00, 0x3d  TLS1.2
+
+Certificate types: CTYPE-X.509
+Protocols: VERS-TLS1.2, VERS-TLS1.1, VERS-TLS1.0, VERS-SSL3.0, VERS-DTLS1.0
+Compression: COMP-NULL
+Elliptic curves: CURVE-SECP384R1, CURVE-SECP521R1
+PK-signatures: SIGN-RSA-SHA384, SIGN-ECDSA-SHA384, SIGN-RSA-SHA512, 
SIGN-ECDSA-SHA512
address@hidden example
+
diff --git a/doc/invoke-gnutls-serv.texi b/doc/invoke-gnutls-serv.texi
new file mode 100644
index 0000000..bd7b686
--- /dev/null
+++ b/doc/invoke-gnutls-serv.texi
@@ -0,0 +1,304 @@
address@hidden gnutls-serv Invocation
address@hidden Invoking gnutls-serv
address@hidden gnutls-serv
address@hidden GnuTLS server
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-gnutls-serv.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:12 PM by AutoGen 5.16
+# From the definitions    ../src/serv-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Server program that listens to incoming TLS connections.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{gnutls-serv} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden gnutls-serv help/usage (-h)
address@hidden gnutls-serv help
+
+This is the automatically generated usage text for gnutls-serv.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+gnutls-serv - GnuTLS server - Ver. @@VERSION@@
+USAGE:  gnutls-serv [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]...
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+       --noticket             Don't accept session tickets
+   -g, --generate             Generate Diffie-Hellman and RSA-export parameters
+   -q, --quiet                Suppress some messages
+       --nodb                 Do not use a resumption database
+       --http                 Act as an HTTP server
+       --echo                 Act as an Echo server
+   -u, --udp                  Use DTLS (datagram TLS) over UDP
+       --mtu=num              Set MTU for datagram TLS
+                                - It must be in the range:
+                                  0 to 17000
+   -a, --disable-client-cert  Do not request a client certificate
+   -r, --require-client-cert  Require a client certificate
+       --x509fmtder           Use DER format for certificates to read from
+       --priority=str         Priorities string
+       --dhparams=file        DH params file to use
+                                - file must pre-exist
+       --x509cafile=str       Certificate file or PKCS #11 URL to use
+       --x509crlfile=file     CRL file to use
+                                - file must pre-exist
+       --pgpkeyfile=file      PGP Key file to use
+                                - file must pre-exist
+       --pgpkeyring=file      PGP Key ring file to use
+                                - file must pre-exist
+       --pgpcertfile=file     PGP Public Key (certificate) file to use
+                                - file must pre-exist
+       --x509keyfile=str      X.509 key file or PKCS #11 URL to use
+       --x509certfile=str     X.509 Certificate file or PKCS #11 URL to use
+       --x509dsakeyfile=str   Alternative X.509 key file or PKCS #11 URL to use
+       --x509dsacertfile=str  Alternative X.509 Certificate file or PKCS #11 
URL to use
+       --x509ecckeyfile=str   Alternative X.509 key file or PKCS #11 URL to use
+       --x509ecccertfile=str  Alternative X.509 Certificate file or PKCS #11 
URL to use
+       --pgpsubkey=str        PGP subkey to use (hex or auto)
+       --srppasswd=file       SRP password file to use
+                                - file must pre-exist
+       --srppasswdconf=file   SRP password configuration file to use
+                                - file must pre-exist
+       --pskpasswd=file       PSK password file to use
+                                - file must pre-exist
+       --pskhint=str          PSK identity hint to use
+   -p, --port=num             The port to connect to
+   -l, --list                 Print a list of the supported algorithms and 
modes
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+
+Server program that listens to incoming TLS connections.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden gnutls-serv-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden priority}
address@hidden priority option
address@hidden gnutls-serv-priority
+
+This is the ``priorities string'' option.
+This option takes an argument string.
+TLS algorithms and protocols to enable. You can
+use predefined sets of ciphersuites such as PERFORMANCE,
+NORMAL, SECURE128, SECURE256.
+
+Check  the  GnuTLS  manual  on  section  ``Priority strings'' for more
+information on allowed keywords
address@hidden list}
address@hidden list option (-l)
address@hidden gnutls-serv-list
+
+This is the ``print a list of the supported algorithms and modes'' option.
+Print a list of the supported algorithms and modes. If a priority string is 
given then only the enabled ciphersuites are shown.
address@hidden exit status}
address@hidden gnutls-serv exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden gnutls-serv See Also
+gnutls-cli-debug(1), gnutls-cli(1)
+
address@hidden Examples}
address@hidden gnutls-serv Examples
+Running your own TLS server based on GnuTLS can be useful when
+debugging clients and/or GnuTLS itself.  This section describes how to
+use @code{gnutls-serv} as a simple HTTPS server.
+
+The most basic server can be started as:
+
address@hidden
+gnutls-serv --http
address@hidden example
+
+It will only support anonymous ciphersuites, which many TLS clients
+refuse to use.
+
+The next step is to add support for X.509.  First we generate a CA:
+
address@hidden
+$ certtool --generate-privkey > x509-ca-key.pem
+$ echo 'cn = GnuTLS test CA' > ca.tmpl
+$ echo 'ca' >> ca.tmpl
+$ echo 'cert_signing_key' >> ca.tmpl
+$ certtool --generate-self-signed --load-privkey x509-ca-key.pem \
+  --template ca.tmpl --outfile x509-ca.pem
+...
address@hidden example
+
+Then generate a server certificate.  Remember to change the dns_name
+value to the name of your server host, or skip that command to avoid
+the field.
+
address@hidden
+$ certtool --generate-privkey > x509-server-key.pem
+$ echo 'organization = GnuTLS test server' > server.tmpl
+$ echo 'cn = test.gnutls.org' >> server.tmpl
+$ echo 'tls_www_server' >> server.tmpl
+$ echo 'encryption_key' >> server.tmpl
+$ echo 'signing_key' >> server.tmpl
+$ echo 'dns_name = test.gnutls.org' >> server.tmpl
+$ certtool --generate-certificate --load-privkey x509-server-key.pem \
+  --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem \
+  --template server.tmpl --outfile x509-server.pem
+...
address@hidden example
+
+For use in the client, you may want to generate a client certificate
+as well.
+
address@hidden
+$ certtool --generate-privkey > x509-client-key.pem
+$ echo 'cn = GnuTLS test client' > client.tmpl
+$ echo 'tls_www_client' >> client.tmpl
+$ echo 'encryption_key' >> client.tmpl
+$ echo 'signing_key' >> client.tmpl
+$ certtool --generate-certificate --load-privkey x509-client-key.pem \
+  --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem \
+  --template client.tmpl --outfile x509-client.pem
+...
address@hidden example
+
+To be able to import the client key/certificate into some
+applications, you will need to convert them into a PKCS#12 structure.
+This also encrypts the security sensitive key with a password.
+
address@hidden
+$ certtool --to-p12 --load-ca-certificate x509-ca.pem \
+  --load-privkey x509-client-key.pem --load-certificate x509-client.pem \
+  --outder --outfile x509-client.p12
address@hidden example
+
+For icing, we'll create a proxy certificate for the client too.
+
address@hidden
+$ certtool --generate-privkey > x509-proxy-key.pem
+$ echo 'cn = GnuTLS test client proxy' > proxy.tmpl
+$ certtool --generate-proxy --load-privkey x509-proxy-key.pem \
+  --load-ca-certificate x509-client.pem --load-ca-privkey x509-client-key.pem \
+  --load-certificate x509-client.pem --template proxy.tmpl \
+  --outfile x509-proxy.pem
+...
address@hidden example
+
+Then start the server again:
+
address@hidden
+$ gnutls-serv --http \
+            --x509cafile x509-ca.pem \
+            --x509keyfile x509-server-key.pem \
+            --x509certfile x509-server.pem
address@hidden example
+
+Try connecting to the server using your web browser.  Note that the
+server listens to port 5556 by default.
+
+While you are at it, to allow connections using DSA, you can also
+create a DSA key and certificate for the server.  These credentials
+will be used in the final example below.
+
address@hidden
+$ certtool --generate-privkey --dsa > x509-server-key-dsa.pem
+$ certtool --generate-certificate --load-privkey x509-server-key-dsa.pem \
+  --load-ca-certificate x509-ca.pem --load-ca-privkey x509-ca-key.pem \
+  --template server.tmpl --outfile x509-server-dsa.pem
+...
address@hidden example
+
+The next step is to create OpenPGP credentials for the server.
+
address@hidden
+gpg --gen-key
+...enter whatever details you want, use 'test.gnutls.org' as name...
address@hidden example
+
+Make a note of the OpenPGP key identifier of the newly generated key,
+here it was @code{5D1D14D8}.  You will need to export the key for
+GnuTLS to be able to use it.
+
address@hidden
+gpg -a --export 5D1D14D8 > openpgp-server.txt
+gpg --export 5D1D14D8 > openpgp-server.bin
+gpg --export-secret-keys 5D1D14D8 > openpgp-server-key.bin
+gpg -a --export-secret-keys 5D1D14D8 > openpgp-server-key.txt
address@hidden example
+
+Let's start the server with support for OpenPGP credentials:
+
address@hidden
+gnutls-serv --http \
+            --pgpkeyfile openpgp-server-key.txt \
+            --pgpcertfile openpgp-server.txt
address@hidden example
+
+The next step is to add support for SRP authentication. This requires
+an SRP password file created with @code{srptool}.
+To start the server with SRP support:
+
address@hidden
+gnutls-serv --http \
+            --srppasswdconf srp-tpasswd.conf \
+            --srppasswd srp-passwd.txt
address@hidden example
+
+Let's also start a server with support for PSK. This would require
+a password file created with @code{psktool}.
+
address@hidden
+gnutls-serv --http \
+            --pskpasswd psk-passwd.txt
address@hidden example
+
+Finally, we start the server with all the earlier parameters and you
+get this command:
+
address@hidden
+gnutls-serv --http \
+            --x509cafile x509-ca.pem \
+            --x509keyfile x509-server-key.pem \
+            --x509certfile x509-server.pem \
+            --x509dsakeyfile x509-server-key-dsa.pem \
+            --x509dsacertfile x509-server-dsa.pem \
+            --pgpkeyfile openpgp-server-key.txt \
+            --pgpcertfile openpgp-server.txt \
+            --srppasswdconf srp-tpasswd.conf \
+            --srppasswd srp-passwd.txt \
+            --pskpasswd psk-passwd.txt
address@hidden example
+
diff --git a/doc/invoke-ocsptool.texi b/doc/invoke-ocsptool.texi
new file mode 100644
index 0000000..e353492
--- /dev/null
+++ b/doc/invoke-ocsptool.texi
@@ -0,0 +1,262 @@
address@hidden ocsptool Invocation
address@hidden Invoking ocsptool
address@hidden ocsptool
address@hidden GnuTLS OCSP tool
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-ocsptool.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:13 PM by AutoGen 5.16
+# From the definitions    ../src/ocsptool-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Ocsptool is a program that can parse and print information about
+OCSP requests/responses, generate requests and verify responses.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{ocsptool} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden ocsptool help/usage (-h)
address@hidden ocsptool help
+
+This is the automatically generated usage text for ocsptool.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+ocsptool - GnuTLS OCSP tool - Ver. @@VERSION@@
+USAGE:  ocsptool [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]...
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+   -V, --verbose              More verbose output
+                                - may appear multiple times
+       --infile=file          Input file
+                                - file must pre-exist
+       --outfile=str          Output file
+       --ask[=arg]            Ask an OCSP/HTTP server on a certificate validity
+                                - requires these options:
+                                load-cert
+                                load-issuer
+   -e, --verify-response      Verify response
+   -i, --request-info         Print information on a OCSP request
+   -j, --response-info        Print information on a OCSP response
+   -q, --generate-request     Generate an OCSP request
+       --nonce                Don't add nonce to OCSP request
+                                - disabled as --no-nonce
+       --load-issuer=file     Read issuer certificate from file
+                                - file must pre-exist
+       --load-cert=file       Read certificate to check from file
+                                - file must pre-exist
+       --load-trust=file      Read OCSP trust anchors from file
+                                - prohibits these options:
+                                load-signer
+                                - file must pre-exist
+       --load-signer=file     Read OCSP response signer from file
+                                - prohibits these options:
+                                load-trust
+                                - file must pre-exist
+       --inder                Use DER format for input certificates and 
private keys
+                                - disabled as --no-inder
+   -Q, --load-request=file    Read DER encoded OCSP request from file
+                                - file must pre-exist
+   -S, --load-response=file   Read DER encoded OCSP response from file
+                                - file must pre-exist
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+
+Ocsptool is a program that can parse and print information about OCSP
+requests/responses, generate requests and verify responses.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden ocsptool-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden ask}
address@hidden ask option
address@hidden ocsptool-ask
+
+This is the ``ask an ocsp/http server on a certificate validity'' option.
+This option takes an optional argument string @file{server name|url}.
+
address@hidden
+This option has some usage constraints.  It:
address@hidden @bullet
address@hidden
+must appear in combination with the following options:
+load-cert, load-issuer.
address@hidden itemize
+
+Connects to the specified HTTP OCSP server and queries on the validity of the 
loaded certificate.
address@hidden exit status}
address@hidden ocsptool exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden ocsptool See Also
+    certtool (1)
+
address@hidden Examples}
address@hidden ocsptool Examples
address@hidden Print information about an OCSP request
+
+To parse an OCSP request and print information about the content, the
address@hidden or @code{--request-info} parameter may be used as follows.
+The @code{-Q} parameter specify the name of the file containing the
+OCSP request, and it should contain the OCSP request in binary DER
+format.
+
address@hidden
+$ ocsptool -i -Q ocsp-request.der
address@hidden example
+
+The input file may also be sent to standard input like this:
+
address@hidden
+$ cat ocsp-request.der | ocsptool --request-info
address@hidden example
+
address@hidden Print information about an OCSP response
+
+Similar to parsing OCSP requests, OCSP responses can be parsed using
+the @code{-j} or @code{--response-info} as follows.
+
address@hidden
+$ ocsptool -j -Q ocsp-response.der
+$ cat ocsp-response.der | ocsptool --response-info
address@hidden example
+
address@hidden Generate an OCSP request
+
+The @code{-q} or @code{--generate-request} parameters are used to
+generate an OCSP request.  By default the OCSP request is written to
+standard output in binary DER format, but can be stored in a file
+using @code{--outfile}.  To generate an OCSP request the issuer of the
+certificate to check needs to be specified with @code{--load-issuer}
+and the certificate to check with @code{--load-cert}.  By default PEM
+format is used for these files, although @code{--inder} can be used to
+specify that the input files are in DER format.
+
address@hidden
+$ ocsptool -q --load-issuer issuer.pem --load-cert client.pem \
+           --outfile ocsp-request.der
address@hidden example
+
+When generating OCSP requests, the tool will add an OCSP extension
+containing a nonce.  This behaviour can be disabled by specifying
address@hidden
+
address@hidden Verify signature in OCSP response
+
+To verify the signature in an OCSP response the @code{-e} or
address@hidden parameter is used.  The tool will read an
+OCSP response in DER format from standard input, or from the file
+specified by @code{--load-response}.  The OCSP response is verified
+against a set of trust anchors, which are specified using
address@hidden  The trust anchors are concatenated certificates
+in PEM format.  The certificate that signed the OCSP response needs to
+be in the set of trust anchors, or the issuer of the signer
+certificate needs to be in the set of trust anchors and the OCSP
+Extended Key Usage bit has to be asserted in the signer certificate.
+
address@hidden
+$ ocsptool -e --load-trust issuer.pem \
+           --load-response ocsp-response.der
address@hidden example
+
+The tool will print status of verification.
+
address@hidden Verify signature in OCSP response against given certificate
+
+It is possible to override the normal trust logic if you know that a
+certain certificate is supposed to have signed the OCSP response, and
+you want to use it to check the signature.  This is achieved using
address@hidden instead of @code{--load-trust}.  This will load
+one certificate and it will be used to verify the signature in the
+OCSP response.  It will not check the Extended Key Usage bit.
+
address@hidden
+$ ocsptool -e --load-signer ocsp-signer.pem \
+           --load-response ocsp-response.der
address@hidden example
+
+This approach is normally only relevant in two situations.  The first
+is when the OCSP response does not contain a copy of the signer
+certificate, so the @code{--load-trust} code would fail.  The second
+is if you want to avoid the indirect mode where the OCSP response
+signer certificate is signed by a trust anchor.
+
address@hidden Real-world example
+
+Here is an example of how to generate an OCSP request for a
+certificate and to verify the response.  For illustration we'll use
+the @code{blog.josefsson.org} host, which (as of writing) uses a
+certificate from CACert.  First we'll use @code{gnutls-cli} to get a
+copy of the server certificate chain.  The server is not required to
+send this information, but this particular one is configured to do so.
+
address@hidden
+$ echo | gnutls-cli -p 443 blog.josefsson.org --print-cert > chain.pem
address@hidden example
+
+Use a text editor on @code{chain.pem} to create three files for each
+separate certificates, called @code{cert.pem} for the first
+certificate for the domain itself, secondly @code{issuer.pem} for the
+intermediate certificate and @code{root.pem} for the final root
+certificate.
+
+The domain certificate normally contains a pointer to where the OCSP
+responder is located, in the Authority Information Access Information
+extension.  For example, from @code{certtool -i < cert.pem} there is
+this information:
+
address@hidden
+Authority Information Access Information (not critical):
+Access Method: 1.3.6.1.5.5.7.48.1 (id-ad-ocsp)
+Access Location URI: http://ocsp.CAcert.org/
address@hidden example
+
+This means the CA support OCSP queries over HTTP.  We are now ready to
+create a OCSP request for the certificate.
+
address@hidden
+$ ocsptool --ask ocsp.CAcert.org --load-issuer issuer.pem \
+           --load-cert cert.pem --outfile ocsp-response.der
address@hidden example
+
+The request is sent via HTTP to the OCSP server address specified. If the
+address is ommited ocsptool will use the address stored in the certificate.
+
+
diff --git a/doc/invoke-p11tool.texi b/doc/invoke-p11tool.texi
new file mode 100644
index 0000000..e40de1b
--- /dev/null
+++ b/doc/invoke-p11tool.texi
@@ -0,0 +1,216 @@
address@hidden p11tool Invocation
address@hidden Invoking p11tool
address@hidden p11tool
address@hidden GnuTLS PKCS #11 tool
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-p11tool.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:14 PM by AutoGen 5.16
+# From the definitions    ../src/p11tool-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Program that allows handling data from PKCS #11 smart cards
+and security modules. 
+
+To use PKCS #11 tokens with gnutls the configuration file 
+/etc/gnutls/pkcs11.conf has to exist and contain a number of lines of the form 
'load=/usr/lib/opensc-pkcs11.so'.
+
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{p11tool} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden p11tool help/usage (-h)
address@hidden p11tool help
+
+This is the automatically generated usage text for p11tool.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+p11tool - GnuTLS PKCS #11 tool - Ver. @@VERSION@@
+USAGE:  p11tool [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]... [url]
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+       --outfile=str          Output file
+       --list-tokens          List all available tokens
+       --export               Export the object specified by the URL
+       --list-mechanisms      List all available mechanisms in a token
+       --list-all             List all available objects in a token
+       --list-all-certs       List all available certificates in a token
+       --list-certs           List all certificates that have an associated 
private key
+       --list-all-privkeys    List all available private keys in a token
+       --list-all-trusted     List all available certificates marked as trusted
+       --initialize           Initializes a PKCS #11 token
+       --write                Writes the loaded objects to a PKCS #11 token
+       --delete               Deletes the objects matching the PKCS #11 URL
+       --generate-rsa         Generate an RSA private-public key pair
+       --generate-dsa         Generate an RSA private-public key pair
+       --generate-ecc         Generate an RSA private-public key pair
+       --label=str            Sets a label for the write operation
+       --trusted              Marks the object to be written as trusted
+                                - disabled as --no-trusted
+       --private              Marks the object to be written as private
+                                - disabled as --no-private
+                                - enabled by default
+       --login                Force login to token
+                                - disabled as --no-login
+       --detailed-url         Print detailed URLs
+                                - disabled as --no-detailed-url
+       --secret-key=str       Provide a hex encoded secret key
+       --load-privkey=file    Private key file to use
+                                - file must pre-exist
+       --load-pubkey=file     Public key file to use
+                                - file must pre-exist
+       --load-certificate=file Certificate file to use
+                                - file must pre-exist
+   -8, --pkcs8                Use PKCS #8 format for private keys
+       --bits=num             Specify the number of bits for key generate
+       --sec-param=str        Specify the security level
+       --inder                Use DER/RAW format for input
+                                - disabled as --no-inder
+       --inraw                This is an alias for 'inder'
+       --provider=file        Specify the PKCS #11 provider library
+                                - file must pre-exist
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+Operands and options may be intermixed.  They will be reordered.
+
+
+
+Program that allows handling data from PKCS #11 smart cards and security
+modules.
+
+To use PKCS #11 tokens with gnutls the configuration file
+/etc/gnutls/pkcs11.conf has to exist and contain a number of lines of the
+form 'load=/usr/lib/opensc-pkcs11.so'.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden p11tool-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden write}
address@hidden write option
address@hidden p11tool-write
+
+This is the ``writes the loaded objects to a pkcs #11 token'' option.
+It can be used to write private keys, certificates or secret keys to a token.
address@hidden generate-rsa}
address@hidden generate-rsa option
address@hidden p11tool-generate-rsa
+
+This is the ``generate an rsa private-public key pair'' option.
+Generates an RSA private-public key pair on the specified token.
address@hidden generate-dsa}
address@hidden generate-dsa option
address@hidden p11tool-generate-dsa
+
+This is the ``generate an rsa private-public key pair'' option.
+Generates an RSA private-public key pair on the specified token.
address@hidden generate-ecc}
address@hidden generate-ecc option
address@hidden p11tool-generate-ecc
+
+This is the ``generate an rsa private-public key pair'' option.
+Generates an RSA private-public key pair on the specified token.
address@hidden private}
address@hidden private option
address@hidden p11tool-private
+
+This is the ``marks the object to be written as private'' option.
+
address@hidden
+This option has some usage constraints.  It:
address@hidden @bullet
address@hidden
+is enabled by default.
address@hidden itemize
+
+The written object will require a PIN to be used.
address@hidden sec-param}
address@hidden sec-param option
address@hidden p11tool-sec-param
+
+This is the ``specify the security level'' option.
+This option takes an argument string @file{Security parameter}.
+This is alternative to the bits option. Available options are [low, legacy, 
normal, high, ultra].
address@hidden inder}
address@hidden inder option
address@hidden p11tool-inder
+
+This is the ``use der/raw format for input'' option.
+Use DER/RAW format for input certificates and private keys.
address@hidden inraw}
address@hidden inraw option
address@hidden p11tool-inraw
+
+This is an alias for the inder option,
address@hidden inder, the inder option documentation}.
+
address@hidden provider}
address@hidden provider option
address@hidden p11tool-provider
+
+This is the ``specify the pkcs #11 provider library'' option.
+This option takes an argument file.
+This will override the default options in /etc/gnutls/pkcs11.conf
address@hidden exit status}
address@hidden p11tool exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden p11tool See Also
+    certtool (1)
+
address@hidden Examples}
address@hidden p11tool Examples
+To view all tokens in your system use:
address@hidden
+$ p11tool --list-tokens
address@hidden example
+
+To view all objects in a token use:
address@hidden
+$ p11tool --login --list-all "pkcs11:TOKEN-URL"
address@hidden example
+
+To store a private key and a certificate in a token run:
address@hidden
+$ p11tool --login --write "pkcs11:URL" --load-privkey key.pem \
+          --label "Mykey"
+$ p11tool --login --write "pkcs11:URL" --load-certificate cert.pem \
+          --label "Mykey"
address@hidden example
+Note that some tokens require the same label to be used for the certificate
+and its corresponding private key.
+
diff --git a/doc/invoke-psktool.texi b/doc/invoke-psktool.texi
new file mode 100644
index 0000000..41dd9d0
--- /dev/null
+++ b/doc/invoke-psktool.texi
@@ -0,0 +1,100 @@
address@hidden psktool Invocation
address@hidden Invoking psktool
address@hidden psktool
address@hidden GnuTLS PSK tool
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-psktool.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:14 PM by AutoGen 5.16
+# From the definitions    ../src/psk-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Program  that generates random keys for use with TLS-PSK. The
+keys are stored in hexadecimal format in a key file.
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{psktool} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden psktool help/usage (-h)
address@hidden psktool help
+
+This is the automatically generated usage text for psktool.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+psktool - GnuTLS PSK tool - Ver. @@VERSION@@
+USAGE:  psktool [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]...
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+   -s, --keysize=num          specify the key size in bytes
+                                - It must be in the range:
+                                  0 to 512
+   -u, --username=str         specify a username
+   -p, --passwd=str           specify a password file.
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+
+Program that generates random keys for use with TLS-PSK.  The keys are
+stored in hexadecimal format in a key file.
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden psktool-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden exit status}
address@hidden psktool exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden psktool See Also
+    gnutls-cli-debug (1), gnutls-serv (1), srptool (1), certtool (1)
+
address@hidden Examples}
address@hidden psktool Examples
+To add a user 'psk_identity' in @file{passwd.psk} for use with GnuTLS run:
address@hidden
+$ ./psktool -u psk_identity -p passwd.psk
+Generating a random key for user 'psk_identity'
+Key stored to passwd.psk
+$ cat psks.txt
+psk_identity:88f3824b3e5659f52d00e959bacab954b6540344
+$
address@hidden example
+
+This command will create @file{passwd.psk} if it does not exist
+and will add user 'psk_identity' (you will also be prompted for a password). 
+
diff --git a/doc/invoke-srptool.texi b/doc/invoke-srptool.texi
new file mode 100644
index 0000000..a0fafbd
--- /dev/null
+++ b/doc/invoke-srptool.texi
@@ -0,0 +1,140 @@
address@hidden srptool Invocation
address@hidden Invoking srptool
address@hidden srptool
address@hidden GnuTLS SRP tool
address@hidden
+#  -*- buffer-read-only: t -*- vi: set ro:
+# 
+# DO NOT EDIT THIS FILE   (invoke-srptool.texi)
+# 
+# It has been AutoGen-ed  May  9, 2012 at 08:06:13 PM by AutoGen 5.16
+# From the definitions    ../src/srptool-args.def
+# and the template file   agtexi-cmd.tpl
address@hidden ignore
+
+
+Simple program that emulates the programs in the Stanford SRP (Secure
+Remote Password) libraries using GnuTLS.  It is intended for use in  places
+where you don't expect SRP authentication to be the used for system users.
+
+In  brief,  to use SRP you need to create two files. These are the password
+file that holds the users and the verifiers associated with  them  and  the
+configuration file to hold the group parameters (called tpasswd.conf).
+
+This section was generated by @strong{AutoGen},
+using the @code{agtexi-cmd} template and the option descriptions for the 
@code{srptool} program.
+This software is released under the GNU General Public License, version 3 or 
later.
+
+
address@hidden usage}
address@hidden srptool help/usage (-h)
address@hidden srptool help
+
+This is the automatically generated usage text for srptool.
+The text printed is the same whether for the @code{help} option (-h) or the 
@code{more-help} option (-!).  @code{more-help} will print
+the usage text by passing it through a pager program.
address@hidden is disabled on platforms without a working
address@hidden(2)} function.  The @code{PAGER} environment variable is
+used to select the program, defaulting to @file{more}.  Both will exit
+with a status code of 0.
+
address@hidden 0
address@hidden
+srptool - GnuTLS SRP tool - Ver. @@VERSION@@
+USAGE:  srptool [ -<flag> [<val>] | --<name>address@hidden| @}<val>] ]...
+
+   -d, --debug=num            Enable debugging.
+                                - It must be in the range:
+                                  0 to 9999
+   -i, --index                specify the index of the group parameters in 
tpasswd.conf to use.
+   -u, --username=str         specify a username
+   -p, --passwd=str           specify a password file.
+   -s, --salt=num             specify salt size.
+       --verify               just verify the password.
+   -v, --passwd-conf=str      specify a password conf file.
+       --create-conf=str      Generate a password configuration file.
+   -v, --version[=arg]        Output version information and exit
+   -h, --help                 Display extended usage information and exit
+   -!, --more-help            Extended usage information passed thru pager
+
+Options are specified by doubled hyphens and their name or by a single
+hyphen and the flag character.
+
+
+
+Simple program that emulates the programs in the Stanford SRP (Secure
+Remote Password) libraries using GnuTLS.  It is intended for use in places
+where you don't expect SRP authentication to be the used for system users.
+
+In brief, to use SRP you need to create two files.  These are the password
+file that holds the users and the verifiers associated with them and the
+configuration file to hold the group parameters (called tpasswd.conf).
+
+please send bug reports to:  bug-gnutls@@gnu.org
address@hidden example
address@hidden 4
+
address@hidden debug}
address@hidden debug option (-d)
address@hidden srptool-debug
+
+This is the ``enable debugging.'' option.
+This option takes an argument number.
+Specifies the debug level.
address@hidden verify}
address@hidden verify option
address@hidden srptool-verify
+
+This is the ``just verify the password.'' option.
+Verifies the password provided against the password file.
address@hidden passwd-conf}
address@hidden passwd-conf option (-v)
address@hidden srptool-passwd-conf
+
+This is the ``specify a password conf file.'' option.
+This option takes an argument string.
+Specify a filename or a PKCS #11 URL to read the CAs from.
address@hidden create-conf}
address@hidden create-conf option
address@hidden srptool-create-conf
+
+This is the ``generate a password configuration file.'' option.
+This option takes an argument string.
+This generates a password configuration file (tpasswd.conf)
+containing the required for TLS parameters.
address@hidden exit status}
address@hidden srptool exit status
+
+One of the following exit values will be returned:
address@hidden @samp
address@hidden 0 (EXIT_SUCCESS)
+Successful program execution.
address@hidden 1 (EXIT_FAILURE)
+The operation failed or the command syntax was not valid.
address@hidden table
address@hidden See Also}
address@hidden srptool See Also
+    gnutls-cli-debug (1), gnutls-serv (1), srptool (1), psktool (1), certtool 
(1)
+
address@hidden Examples}
address@hidden srptool Examples
+To create @file{tpasswd.conf} which holds the g and n values for SRP protocol
+(generator and a large prime), run:
address@hidden
+$ srptool --create-conf /etc/tpasswd.conf
address@hidden example
+
+This command will create @file{/etc/tpasswd} and will add user 'test' (you
+will also be prompted for a password). Verifiers are stored by default
+in the way libsrp expects.
address@hidden
+$ srptool --passwd /etc/tpasswd --passwd-conf /etc/tpasswd.conf -u test
address@hidden example
+
+
+This command will check against a password. If the password matches
+the one in @file{/etc/tpasswd} you will get an ok.
address@hidden
+$ srptool --passwd /etc/tpasswd --passwd\-conf /etc/tpasswd.conf --verify -u 
test
address@hidden example
+
diff --git a/src/certtool-args.c b/src/certtool-args.c
new file mode 100644
index 0000000..7ba47d2
--- /dev/null
+++ b/src/certtool-args.c
@@ -0,0 +1,1783 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (certtool-args.c)
+ *  
+ *  It has been AutoGen-ed  May 14, 2012 at 05:25:37 PM by AutoGen 5.16
+ *  From the definitions    certtool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the certtool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The certtool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  certtool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  certtool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "certtool-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (certtool_opt_strs+0)
+#define zLicenseDescrip (certtool_opt_strs+279)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  certtool option static const strings
+ */
+static char const certtool_opt_strs[4606] =
+/*     0 */ "certtool @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   279 */ "certtool is free software: you can redistribute it and/or modify 
it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "certtool is distributed in the hope that it will be useful, but 
WITHOUT ANY\n"
+            "WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS\n"
+            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more\n"
+            "details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   884 */ "Enable debugging.\0"
+/*   902 */ "DEBUG\0"
+/*   908 */ "debug\0"
+/*   914 */ "Input file\0"
+/*   925 */ "INFILE\0"
+/*   932 */ "infile\0"
+/*   939 */ "Output file\0"
+/*   951 */ "OUTFILE\0"
+/*   959 */ "outfile\0"
+/*   967 */ "Generate a self-signed certificate\0"
+/*  1002 */ "GENERATE_SELF_SIGNED\0"
+/*  1023 */ "generate-self-signed\0"
+/*  1044 */ "Generate a signed certificate\0"
+/*  1074 */ "GENERATE_CERTIFICATE\0"
+/*  1095 */ "generate-certificate\0"
+/*  1116 */ "Generates a proxy certificate\0"
+/*  1146 */ "GENERATE_PROXY\0"
+/*  1161 */ "generate-proxy\0"
+/*  1176 */ "Generate a CRL\0"
+/*  1191 */ "GENERATE_CRL\0"
+/*  1204 */ "generate-crl\0"
+/*  1217 */ "Update a signed certificate\0"
+/*  1245 */ "UPDATE_CERTIFICATE\0"
+/*  1264 */ "update-certificate\0"
+/*  1283 */ "Generate a private key\0"
+/*  1306 */ "GENERATE_PRIVKEY\0"
+/*  1323 */ "generate-privkey\0"
+/*  1340 */ "Generate a PKCS #10 certificate request\0"
+/*  1380 */ "GENERATE_REQUEST\0"
+/*  1397 */ "generate-request\0"
+/*  1414 */ "Verify a PEM encoded certificate chain.\0"
+/*  1454 */ "VERIFY_CHAIN\0"
+/*  1467 */ "verify-chain\0"
+/*  1480 */ "Verify a PEM encoded certificate chain using a trusted list.\0"
+/*  1541 */ "VERIFY\0"
+/*  1548 */ "verify\0"
+/*  1555 */ "Verify a CRL using a trusted list.\0"
+/*  1590 */ "VERIFY_CRL\0"
+/*  1601 */ "verify-crl\0"
+/*  1612 */ "Generate PKCS #3 encoded Diffie-Hellman parameters.\0"
+/*  1664 */ "GENERATE_DH_PARAMS\0"
+/*  1683 */ "generate-dh-params\0"
+/*  1702 */ "Get the included PKCS #3 encoded Diffie-Hellman parameters.\0"
+/*  1762 */ "GET_DH_PARAMS\0"
+/*  1776 */ "get-dh-params\0"
+/*  1790 */ "Print information PKCS #3 encoded Diffie-Hellman parameters\0"
+/*  1850 */ "DH_INFO\0"
+/*  1858 */ "dh-info\0"
+/*  1866 */ "Loads a private key file\0"
+/*  1891 */ "LOAD_PRIVKEY\0"
+/*  1904 */ "load-privkey\0"
+/*  1917 */ "Loads a public key file\0"
+/*  1941 */ "LOAD_PUBKEY\0"
+/*  1953 */ "load-pubkey\0"
+/*  1965 */ "Loads a certificate request file\0"
+/*  1998 */ "LOAD_REQUEST\0"
+/*  2011 */ "load-request\0"
+/*  2024 */ "Loads a certificate file\0"
+/*  2049 */ "LOAD_CERTIFICATE\0"
+/*  2066 */ "load-certificate\0"
+/*  2083 */ "Loads the certificate authority's private key file\0"
+/*  2134 */ "LOAD_CA_PRIVKEY\0"
+/*  2150 */ "load-ca-privkey\0"
+/*  2166 */ "Loads the certificate authority's certificate file\0"
+/*  2217 */ "LOAD_CA_CERTIFICATE\0"
+/*  2237 */ "load-ca-certificate\0"
+/*  2257 */ "Password to use\0"
+/*  2273 */ "PASSWORD\0"
+/*  2282 */ "password\0"
+/*  2291 */ "Print information on the given certificate\0"
+/*  2334 */ "CERTIFICATE_INFO\0"
+/*  2351 */ "certificate-info\0"
+/*  2368 */ "Print certificate's public key\0"
+/*  2399 */ "CERTIFICATE_PUBKEY\0"
+/*  2418 */ "certificate-pubkey\0"
+/*  2437 */ "Print information on the given OpenPGP certificate\0"
+/*  2488 */ "PGP_CERTIFICATE_INFO\0"
+/*  2509 */ "pgp-certificate-info\0"
+/*  2530 */ "Print information on the given OpenPGP keyring structure\0"
+/*  2587 */ "PGP_RING_INFO\0"
+/*  2601 */ "pgp-ring-info\0"
+/*  2615 */ "Print information on the given CRL structure\0"
+/*  2660 */ "CRL_INFO\0"
+/*  2669 */ "crl-info\0"
+/*  2678 */ "Print information on the given certificate request\0"
+/*  2729 */ "CRQ_INFO\0"
+/*  2738 */ "crq-info\0"
+/*  2747 */ "Do not use extensions in certificate requests\0"
+/*  2793 */ "NO_CRQ_EXTENSIONS\0"
+/*  2811 */ "no-crq-extensions\0"
+/*  2829 */ "Print information on a PKCS #12 structure\0"
+/*  2871 */ "P12_INFO\0"
+/*  2880 */ "p12-info\0"
+/*  2889 */ "Print information on a PKCS #7 structure\0"
+/*  2930 */ "P7_INFO\0"
+/*  2938 */ "p7-info\0"
+/*  2946 */ "Convert S/MIME to PKCS #7 structure\0"
+/*  2982 */ "SMIME_TO_P7\0"
+/*  2994 */ "smime-to-p7\0"
+/*  3006 */ "Print information on a private key\0"
+/*  3041 */ "KEY_INFO\0"
+/*  3050 */ "key-info\0"
+/*  3059 */ "Print information on an OpenPGP private key\0"
+/*  3103 */ "PGP_KEY_INFO\0"
+/*  3116 */ "pgp-key-info\0"
+/*  3129 */ "Print information on a public key\0"
+/*  3163 */ "PUBKEY_INFO\0"
+/*  3175 */ "pubkey-info\0"
+/*  3187 */ "Generate an X.509 version 1 certificate (with no extensions)\0"
+/*  3248 */ "V1\0"
+/*  3251 */ "v1\0"
+/*  3254 */ "Generate a PKCS #12 structure\0"
+/*  3284 */ "TO_P12\0"
+/*  3291 */ "to-p12\0"
+/*  3298 */ "Generate a PKCS #8 structure\0"
+/*  3327 */ "TO_P8\0"
+/*  3333 */ "to-p8\0"
+/*  3339 */ "Use PKCS #8 format for private keys\0"
+/*  3375 */ "PKCS8\0"
+/*  3381 */ "pkcs8\0"
+/*  3387 */ "Generate RSA key\0"
+/*  3404 */ "RSA\0"
+/*  3408 */ "rsa\0"
+/*  3412 */ "Generate DSA key\0"
+/*  3429 */ "DSA\0"
+/*  3433 */ "dsa\0"
+/*  3437 */ "Generate ECC (ECDSA) key\0"
+/*  3462 */ "ECC\0"
+/*  3466 */ "ecc\0"
+/*  3470 */ "Hash algorithm to use for signing.\0"
+/*  3505 */ "HASH\0"
+/*  3510 */ "hash\0"
+/*  3515 */ "Use DER format for input certificates and private keys.\0"
+/*  3571 */ "INDER\0"
+/*  3577 */ "no-inder\0"
+/*  3586 */ "no\0"
+/*  3589 */ "This is an alias for 'inder'\0"
+/*  3618 */ "inraw\0"
+/*  3624 */ "Use DER format for output certificates and private keys\0"
+/*  3680 */ "OUTDER\0"
+/*  3687 */ "no-outder\0"
+/*  3697 */ "This is an alias for 'outder'\0"
+/*  3727 */ "outraw\0"
+/*  3734 */ "Specify the number of bits for key generate\0"
+/*  3778 */ "BITS\0"
+/*  3783 */ "bits\0"
+/*  3788 */ "Specify the security level [low, legacy, normal, high, ultra].\0"
+/*  3851 */ "SEC_PARAM\0"
+/*  3861 */ "sec-param\0"
+/*  3871 */ "No effect\0"
+/*  3881 */ "DISABLE_QUICK_RANDOM\0"
+/*  3902 */ "disable-quick-random\0"
+/*  3923 */ "Template file to use for non-interactive operation\0"
+/*  3974 */ "TEMPLATE\0"
+/*  3983 */ "template\0"
+/*  3992 */ "Cipher to use for PKCS #8 and #12 operations\0"
+/*  4037 */ "PKCS_CIPHER\0"
+/*  4049 */ "pkcs-cipher\0"
+/*  4061 */ "Display extended usage information and exit\0"
+/*  4105 */ "help\0"
+/*  4110 */ "Extended usage information passed thru pager\0"
+/*  4155 */ "more-help\0"
+/*  4165 */ "Output version information and exit\0"
+/*  4201 */ "version\0"
+/*  4209 */ "CERTTOOL\0"
+/*  4218 */ "certtool - GnuTLS PKCS #11 tool - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/*  4325 */ "address@hidden"
+/*  4344 */ "\n\n\0"
+/*  4347 */ "\n"
+            "Tool to parse and generate X.509 certificates, requests and 
private keys.\n"
+            "It can be used interactively or non interactively by specifying 
the\n"
+            "template command line option.\n\0"
+/*  4521 */ "certtool @address@hidden"
+/*  4540 */ "certtool [options] [url]\n"
+            "certtool --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (certtool_opt_strs+884)
+#define DEBUG_NAME      (certtool_opt_strs+902)
+#define DEBUG_name      (certtool_opt_strs+908)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  infile option description:
+ */
+#define INFILE_DESC      (certtool_opt_strs+914)
+#define INFILE_NAME      (certtool_opt_strs+925)
+#define INFILE_name      (certtool_opt_strs+932)
+#define INFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  outfile option description:
+ */
+#define OUTFILE_DESC      (certtool_opt_strs+939)
+#define OUTFILE_NAME      (certtool_opt_strs+951)
+#define OUTFILE_name      (certtool_opt_strs+959)
+#define OUTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  generate-self-signed option description:
+ */
+#define GENERATE_SELF_SIGNED_DESC      (certtool_opt_strs+967)
+#define GENERATE_SELF_SIGNED_NAME      (certtool_opt_strs+1002)
+#define GENERATE_SELF_SIGNED_name      (certtool_opt_strs+1023)
+#define GENERATE_SELF_SIGNED_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-certificate option description:
+ */
+#define GENERATE_CERTIFICATE_DESC      (certtool_opt_strs+1044)
+#define GENERATE_CERTIFICATE_NAME      (certtool_opt_strs+1074)
+#define GENERATE_CERTIFICATE_name      (certtool_opt_strs+1095)
+#define GENERATE_CERTIFICATE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-proxy option description:
+ */
+#define GENERATE_PROXY_DESC      (certtool_opt_strs+1116)
+#define GENERATE_PROXY_NAME      (certtool_opt_strs+1146)
+#define GENERATE_PROXY_name      (certtool_opt_strs+1161)
+#define GENERATE_PROXY_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-crl option description:
+ */
+#define GENERATE_CRL_DESC      (certtool_opt_strs+1176)
+#define GENERATE_CRL_NAME      (certtool_opt_strs+1191)
+#define GENERATE_CRL_name      (certtool_opt_strs+1204)
+#define GENERATE_CRL_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  update-certificate option description:
+ */
+#define UPDATE_CERTIFICATE_DESC      (certtool_opt_strs+1217)
+#define UPDATE_CERTIFICATE_NAME      (certtool_opt_strs+1245)
+#define UPDATE_CERTIFICATE_name      (certtool_opt_strs+1264)
+#define UPDATE_CERTIFICATE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-privkey option description:
+ */
+#define GENERATE_PRIVKEY_DESC      (certtool_opt_strs+1283)
+#define GENERATE_PRIVKEY_NAME      (certtool_opt_strs+1306)
+#define GENERATE_PRIVKEY_name      (certtool_opt_strs+1323)
+#define GENERATE_PRIVKEY_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-request option description:
+ */
+#define GENERATE_REQUEST_DESC      (certtool_opt_strs+1340)
+#define GENERATE_REQUEST_NAME      (certtool_opt_strs+1380)
+#define GENERATE_REQUEST_name      (certtool_opt_strs+1397)
+#define GENERATE_REQUEST_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  verify-chain option description:
+ */
+#define VERIFY_CHAIN_DESC      (certtool_opt_strs+1414)
+#define VERIFY_CHAIN_NAME      (certtool_opt_strs+1454)
+#define VERIFY_CHAIN_name      (certtool_opt_strs+1467)
+#define VERIFY_CHAIN_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  verify option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define VERIFY_DESC      (certtool_opt_strs+1480)
+#define VERIFY_NAME      (certtool_opt_strs+1541)
+#define VERIFY_name      (certtool_opt_strs+1548)
+static int const aVerifyMustList[] = {
+    INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
+#define VERIFY_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  verify-crl option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define VERIFY_CRL_DESC      (certtool_opt_strs+1555)
+#define VERIFY_CRL_NAME      (certtool_opt_strs+1590)
+#define VERIFY_CRL_name      (certtool_opt_strs+1601)
+static int const aVerify_CrlMustList[] = {
+    INDEX_OPT_LOAD_CA_CERTIFICATE, NO_EQUIVALENT };
+#define VERIFY_CRL_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-dh-params option description:
+ */
+#define GENERATE_DH_PARAMS_DESC      (certtool_opt_strs+1612)
+#define GENERATE_DH_PARAMS_NAME      (certtool_opt_strs+1664)
+#define GENERATE_DH_PARAMS_name      (certtool_opt_strs+1683)
+#define GENERATE_DH_PARAMS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  get-dh-params option description:
+ */
+#define GET_DH_PARAMS_DESC      (certtool_opt_strs+1702)
+#define GET_DH_PARAMS_NAME      (certtool_opt_strs+1762)
+#define GET_DH_PARAMS_name      (certtool_opt_strs+1776)
+#define GET_DH_PARAMS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  dh-info option description:
+ */
+#define DH_INFO_DESC      (certtool_opt_strs+1790)
+#define DH_INFO_NAME      (certtool_opt_strs+1850)
+#define DH_INFO_name      (certtool_opt_strs+1858)
+#define DH_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  load-privkey option description:
+ */
+#define LOAD_PRIVKEY_DESC      (certtool_opt_strs+1866)
+#define LOAD_PRIVKEY_NAME      (certtool_opt_strs+1891)
+#define LOAD_PRIVKEY_name      (certtool_opt_strs+1904)
+#define LOAD_PRIVKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  load-pubkey option description:
+ */
+#define LOAD_PUBKEY_DESC      (certtool_opt_strs+1917)
+#define LOAD_PUBKEY_NAME      (certtool_opt_strs+1941)
+#define LOAD_PUBKEY_name      (certtool_opt_strs+1953)
+#define LOAD_PUBKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  load-request option description:
+ */
+#define LOAD_REQUEST_DESC      (certtool_opt_strs+1965)
+#define LOAD_REQUEST_NAME      (certtool_opt_strs+1998)
+#define LOAD_REQUEST_name      (certtool_opt_strs+2011)
+#define LOAD_REQUEST_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-certificate option description:
+ */
+#define LOAD_CERTIFICATE_DESC      (certtool_opt_strs+2024)
+#define LOAD_CERTIFICATE_NAME      (certtool_opt_strs+2049)
+#define LOAD_CERTIFICATE_name      (certtool_opt_strs+2066)
+#define LOAD_CERTIFICATE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  load-ca-privkey option description:
+ */
+#define LOAD_CA_PRIVKEY_DESC      (certtool_opt_strs+2083)
+#define LOAD_CA_PRIVKEY_NAME      (certtool_opt_strs+2134)
+#define LOAD_CA_PRIVKEY_name      (certtool_opt_strs+2150)
+#define LOAD_CA_PRIVKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  load-ca-certificate option description:
+ */
+#define LOAD_CA_CERTIFICATE_DESC      (certtool_opt_strs+2166)
+#define LOAD_CA_CERTIFICATE_NAME      (certtool_opt_strs+2217)
+#define LOAD_CA_CERTIFICATE_name      (certtool_opt_strs+2237)
+#define LOAD_CA_CERTIFICATE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  password option description:
+ */
+#define PASSWORD_DESC      (certtool_opt_strs+2257)
+#define PASSWORD_NAME      (certtool_opt_strs+2273)
+#define PASSWORD_name      (certtool_opt_strs+2282)
+#define PASSWORD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  certificate-info option description:
+ */
+#define CERTIFICATE_INFO_DESC      (certtool_opt_strs+2291)
+#define CERTIFICATE_INFO_NAME      (certtool_opt_strs+2334)
+#define CERTIFICATE_INFO_name      (certtool_opt_strs+2351)
+#define CERTIFICATE_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  certificate-pubkey option description:
+ */
+#define CERTIFICATE_PUBKEY_DESC      (certtool_opt_strs+2368)
+#define CERTIFICATE_PUBKEY_NAME      (certtool_opt_strs+2399)
+#define CERTIFICATE_PUBKEY_name      (certtool_opt_strs+2418)
+#define CERTIFICATE_PUBKEY_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  pgp-certificate-info option description:
+ */
+#define PGP_CERTIFICATE_INFO_DESC      (certtool_opt_strs+2437)
+#define PGP_CERTIFICATE_INFO_NAME      (certtool_opt_strs+2488)
+#define PGP_CERTIFICATE_INFO_name      (certtool_opt_strs+2509)
+#define PGP_CERTIFICATE_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  pgp-ring-info option description:
+ */
+#define PGP_RING_INFO_DESC      (certtool_opt_strs+2530)
+#define PGP_RING_INFO_NAME      (certtool_opt_strs+2587)
+#define PGP_RING_INFO_name      (certtool_opt_strs+2601)
+#define PGP_RING_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  crl-info option description:
+ */
+#define CRL_INFO_DESC      (certtool_opt_strs+2615)
+#define CRL_INFO_NAME      (certtool_opt_strs+2660)
+#define CRL_INFO_name      (certtool_opt_strs+2669)
+#define CRL_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  crq-info option description:
+ */
+#define CRQ_INFO_DESC      (certtool_opt_strs+2678)
+#define CRQ_INFO_NAME      (certtool_opt_strs+2729)
+#define CRQ_INFO_name      (certtool_opt_strs+2738)
+#define CRQ_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  no-crq-extensions option description:
+ */
+#define NO_CRQ_EXTENSIONS_DESC      (certtool_opt_strs+2747)
+#define NO_CRQ_EXTENSIONS_NAME      (certtool_opt_strs+2793)
+#define NO_CRQ_EXTENSIONS_name      (certtool_opt_strs+2811)
+#define NO_CRQ_EXTENSIONS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  p12-info option description:
+ */
+#define P12_INFO_DESC      (certtool_opt_strs+2829)
+#define P12_INFO_NAME      (certtool_opt_strs+2871)
+#define P12_INFO_name      (certtool_opt_strs+2880)
+#define P12_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  p7-info option description:
+ */
+#define P7_INFO_DESC      (certtool_opt_strs+2889)
+#define P7_INFO_NAME      (certtool_opt_strs+2930)
+#define P7_INFO_name      (certtool_opt_strs+2938)
+#define P7_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  smime-to-p7 option description:
+ */
+#define SMIME_TO_P7_DESC      (certtool_opt_strs+2946)
+#define SMIME_TO_P7_NAME      (certtool_opt_strs+2982)
+#define SMIME_TO_P7_name      (certtool_opt_strs+2994)
+#define SMIME_TO_P7_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  key-info option description:
+ */
+#define KEY_INFO_DESC      (certtool_opt_strs+3006)
+#define KEY_INFO_NAME      (certtool_opt_strs+3041)
+#define KEY_INFO_name      (certtool_opt_strs+3050)
+#define KEY_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  pgp-key-info option description:
+ */
+#define PGP_KEY_INFO_DESC      (certtool_opt_strs+3059)
+#define PGP_KEY_INFO_NAME      (certtool_opt_strs+3103)
+#define PGP_KEY_INFO_name      (certtool_opt_strs+3116)
+#define PGP_KEY_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  pubkey-info option description:
+ */
+#define PUBKEY_INFO_DESC      (certtool_opt_strs+3129)
+#define PUBKEY_INFO_NAME      (certtool_opt_strs+3163)
+#define PUBKEY_INFO_name      (certtool_opt_strs+3175)
+#define PUBKEY_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  v1 option description:
+ */
+#define V1_DESC      (certtool_opt_strs+3187)
+#define V1_NAME      (certtool_opt_strs+3248)
+#define V1_name      (certtool_opt_strs+3251)
+#define V1_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  to-p12 option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define TO_P12_DESC      (certtool_opt_strs+3254)
+#define TO_P12_NAME      (certtool_opt_strs+3284)
+#define TO_P12_name      (certtool_opt_strs+3291)
+static int const aTo_P12MustList[] = {
+    INDEX_OPT_LOAD_CERTIFICATE,
+    INDEX_OPT_LOAD_PRIVKEY, NO_EQUIVALENT };
+#define TO_P12_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  to-p8 option description:
+ */
+#define TO_P8_DESC      (certtool_opt_strs+3298)
+#define TO_P8_NAME      (certtool_opt_strs+3327)
+#define TO_P8_name      (certtool_opt_strs+3333)
+#define TO_P8_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  pkcs8 option description:
+ */
+#define PKCS8_DESC      (certtool_opt_strs+3339)
+#define PKCS8_NAME      (certtool_opt_strs+3375)
+#define PKCS8_name      (certtool_opt_strs+3381)
+#define PKCS8_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  rsa option description:
+ */
+#define RSA_DESC      (certtool_opt_strs+3387)
+#define RSA_NAME      (certtool_opt_strs+3404)
+#define RSA_name      (certtool_opt_strs+3408)
+#define RSA_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  dsa option description:
+ */
+#define DSA_DESC      (certtool_opt_strs+3412)
+#define DSA_NAME      (certtool_opt_strs+3429)
+#define DSA_name      (certtool_opt_strs+3433)
+#define DSA_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  ecc option description:
+ */
+#define ECC_DESC      (certtool_opt_strs+3437)
+#define ECC_NAME      (certtool_opt_strs+3462)
+#define ECC_name      (certtool_opt_strs+3466)
+#define ECC_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  hash option description:
+ */
+#define HASH_DESC      (certtool_opt_strs+3470)
+#define HASH_NAME      (certtool_opt_strs+3505)
+#define HASH_name      (certtool_opt_strs+3510)
+#define HASH_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  inder option description:
+ */
+#define INDER_DESC      (certtool_opt_strs+3515)
+#define INDER_NAME      (certtool_opt_strs+3571)
+#define NOT_INDER_name  (certtool_opt_strs+3577)
+#define NOT_INDER_PFX   (certtool_opt_strs+3586)
+#define INDER_name      (NOT_INDER_name + 3)
+#define INDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  inraw option description:
+ */
+#define INRAW_DESC    (certtool_opt_strs+3589)
+#define INRAW_NAME    NULL
+#define INRAW_name    (certtool_opt_strs+3618)
+#define INRAW_FLAGS     (INDER_FLAGS | OPTST_ALIAS)
+
+/*
+ *  outder option description:
+ */
+#define OUTDER_DESC      (certtool_opt_strs+3624)
+#define OUTDER_NAME      (certtool_opt_strs+3680)
+#define NOT_OUTDER_name  (certtool_opt_strs+3687)
+#define NOT_OUTDER_PFX   (certtool_opt_strs+3586)
+#define OUTDER_name      (NOT_OUTDER_name + 3)
+#define OUTDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  outraw option description:
+ */
+#define OUTRAW_DESC    (certtool_opt_strs+3697)
+#define OUTRAW_NAME    NULL
+#define OUTRAW_name    (certtool_opt_strs+3727)
+#define OUTRAW_FLAGS     (OUTDER_FLAGS | OPTST_ALIAS)
+
+/*
+ *  bits option description:
+ */
+#define BITS_DESC      (certtool_opt_strs+3734)
+#define BITS_NAME      (certtool_opt_strs+3778)
+#define BITS_name      (certtool_opt_strs+3783)
+#define BITS_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  sec-param option description:
+ */
+#define SEC_PARAM_DESC      (certtool_opt_strs+3788)
+#define SEC_PARAM_NAME      (certtool_opt_strs+3851)
+#define SEC_PARAM_name      (certtool_opt_strs+3861)
+#define SEC_PARAM_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  disable-quick-random option description:
+ */
+#define DISABLE_QUICK_RANDOM_DESC      (certtool_opt_strs+3871)
+#define DISABLE_QUICK_RANDOM_NAME      (certtool_opt_strs+3881)
+#define DISABLE_QUICK_RANDOM_name      (certtool_opt_strs+3902)
+#define DISABLE_QUICK_RANDOM_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  template option description:
+ */
+#define TEMPLATE_DESC      (certtool_opt_strs+3923)
+#define TEMPLATE_NAME      (certtool_opt_strs+3974)
+#define TEMPLATE_name      (certtool_opt_strs+3983)
+#define TEMPLATE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pkcs-cipher option description:
+ */
+#define PKCS_CIPHER_DESC      (certtool_opt_strs+3992)
+#define PKCS_CIPHER_NAME      (certtool_opt_strs+4037)
+#define PKCS_CIPHER_name      (certtool_opt_strs+4049)
+#define PKCS_CIPHER_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (certtool_opt_strs+4061)
+#define HELP_name       (certtool_opt_strs+4105)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (certtool_opt_strs+4110)
+#define MORE_HELP_name  (certtool_opt_strs+4155)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (certtool_opt_strs+4165)
+#define VER_name        (certtool_opt_strs+4201)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug,        doOptInfile,       doOptInraw,
+    doOptLoad_Request, doOptOutraw,       doOptTemplate,
+    doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the certtool Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the certtool program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_INFILE,
+     /* equiv idx, value */ 1, VALUE_OPT_INFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --infile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptInfile,
+     /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_OUTFILE,
+     /* equiv idx, value */ 2, VALUE_OPT_OUTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OUTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --outfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_GENERATE_SELF_SIGNED,
+     /* equiv idx, value */ 3, VALUE_OPT_GENERATE_SELF_SIGNED,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_SELF_SIGNED_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-self-signed */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_SELF_SIGNED_DESC, 
GENERATE_SELF_SIGNED_NAME, GENERATE_SELF_SIGNED_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_GENERATE_CERTIFICATE,
+     /* equiv idx, value */ 4, VALUE_OPT_GENERATE_CERTIFICATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_CERTIFICATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-certificate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_CERTIFICATE_DESC, 
GENERATE_CERTIFICATE_NAME, GENERATE_CERTIFICATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_GENERATE_PROXY,
+     /* equiv idx, value */ 5, VALUE_OPT_GENERATE_PROXY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_PROXY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-proxy */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_PROXY_DESC, GENERATE_PROXY_NAME, 
GENERATE_PROXY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_GENERATE_CRL,
+     /* equiv idx, value */ 6, VALUE_OPT_GENERATE_CRL,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_CRL_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-crl */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_CRL_DESC, GENERATE_CRL_NAME, 
GENERATE_CRL_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_UPDATE_CERTIFICATE,
+     /* equiv idx, value */ 7, VALUE_OPT_UPDATE_CERTIFICATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ UPDATE_CERTIFICATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --update-certificate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ UPDATE_CERTIFICATE_DESC, UPDATE_CERTIFICATE_NAME, 
UPDATE_CERTIFICATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_GENERATE_PRIVKEY,
+     /* equiv idx, value */ 8, VALUE_OPT_GENERATE_PRIVKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_PRIVKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-privkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_PRIVKEY_DESC, GENERATE_PRIVKEY_NAME, 
GENERATE_PRIVKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 9, VALUE_OPT_GENERATE_REQUEST,
+     /* equiv idx, value */ 9, VALUE_OPT_GENERATE_REQUEST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_REQUEST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-request */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, 
GENERATE_REQUEST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_VERIFY_CHAIN,
+     /* equiv idx, value */ 10, VALUE_OPT_VERIFY_CHAIN,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VERIFY_CHAIN_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verify-chain */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERIFY_CHAIN_DESC, VERIFY_CHAIN_NAME, 
VERIFY_CHAIN_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_VERIFY,
+     /* equiv idx, value */ 11, VALUE_OPT_VERIFY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VERIFY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verify */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ aVerifyMustList, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 12, VALUE_OPT_VERIFY_CRL,
+     /* equiv idx, value */ 12, VALUE_OPT_VERIFY_CRL,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VERIFY_CRL_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verify-crl */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ aVerify_CrlMustList, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERIFY_CRL_DESC, VERIFY_CRL_NAME, VERIFY_CRL_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 13, VALUE_OPT_GENERATE_DH_PARAMS,
+     /* equiv idx, value */ 13, VALUE_OPT_GENERATE_DH_PARAMS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_DH_PARAMS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-dh-params */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_DH_PARAMS_DESC, GENERATE_DH_PARAMS_NAME, 
GENERATE_DH_PARAMS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 14, VALUE_OPT_GET_DH_PARAMS,
+     /* equiv idx, value */ 14, VALUE_OPT_GET_DH_PARAMS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GET_DH_PARAMS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --get-dh-params */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GET_DH_PARAMS_DESC, GET_DH_PARAMS_NAME, 
GET_DH_PARAMS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 15, VALUE_OPT_DH_INFO,
+     /* equiv idx, value */ 15, VALUE_OPT_DH_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DH_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --dh-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DH_INFO_DESC, DH_INFO_NAME, DH_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_LOAD_PRIVKEY,
+     /* equiv idx, value */ 16, VALUE_OPT_LOAD_PRIVKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_PRIVKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-privkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, 
LOAD_PRIVKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 17, VALUE_OPT_LOAD_PUBKEY,
+     /* equiv idx, value */ 17, VALUE_OPT_LOAD_PUBKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_PUBKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-pubkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, 
LOAD_PUBKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 18, VALUE_OPT_LOAD_REQUEST,
+     /* equiv idx, value */ 18, VALUE_OPT_LOAD_REQUEST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_REQUEST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-request */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Request,
+     /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, 
LOAD_REQUEST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 19, VALUE_OPT_LOAD_CERTIFICATE,
+     /* equiv idx, value */ 19, VALUE_OPT_LOAD_CERTIFICATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_CERTIFICATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-certificate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, 
LOAD_CERTIFICATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 20, VALUE_OPT_LOAD_CA_PRIVKEY,
+     /* equiv idx, value */ 20, VALUE_OPT_LOAD_CA_PRIVKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_CA_PRIVKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-ca-privkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOAD_CA_PRIVKEY_DESC, LOAD_CA_PRIVKEY_NAME, 
LOAD_CA_PRIVKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 21, VALUE_OPT_LOAD_CA_CERTIFICATE,
+     /* equiv idx, value */ 21, VALUE_OPT_LOAD_CA_CERTIFICATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_CA_CERTIFICATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-ca-certificate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOAD_CA_CERTIFICATE_DESC, 
LOAD_CA_CERTIFICATE_NAME, LOAD_CA_CERTIFICATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 22, VALUE_OPT_PASSWORD,
+     /* equiv idx, value */ 22, VALUE_OPT_PASSWORD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PASSWORD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --password */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PASSWORD_DESC, PASSWORD_NAME, PASSWORD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 23, VALUE_OPT_CERTIFICATE_INFO,
+     /* equiv idx, value */ 23, VALUE_OPT_CERTIFICATE_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CERTIFICATE_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --certificate-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CERTIFICATE_INFO_DESC, CERTIFICATE_INFO_NAME, 
CERTIFICATE_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 24, VALUE_OPT_CERTIFICATE_PUBKEY,
+     /* equiv idx, value */ 24, VALUE_OPT_CERTIFICATE_PUBKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CERTIFICATE_PUBKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --certificate-pubkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CERTIFICATE_PUBKEY_DESC, CERTIFICATE_PUBKEY_NAME, 
CERTIFICATE_PUBKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 25, VALUE_OPT_PGP_CERTIFICATE_INFO,
+     /* equiv idx, value */ 25, VALUE_OPT_PGP_CERTIFICATE_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGP_CERTIFICATE_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgp-certificate-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PGP_CERTIFICATE_INFO_DESC, 
PGP_CERTIFICATE_INFO_NAME, PGP_CERTIFICATE_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 26, VALUE_OPT_PGP_RING_INFO,
+     /* equiv idx, value */ 26, VALUE_OPT_PGP_RING_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGP_RING_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgp-ring-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PGP_RING_INFO_DESC, PGP_RING_INFO_NAME, 
PGP_RING_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 27, VALUE_OPT_CRL_INFO,
+     /* equiv idx, value */ 27, VALUE_OPT_CRL_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CRL_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --crl-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CRL_INFO_DESC, CRL_INFO_NAME, CRL_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 28, VALUE_OPT_CRQ_INFO,
+     /* equiv idx, value */ 28, VALUE_OPT_CRQ_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CRQ_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --crq-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CRQ_INFO_DESC, CRQ_INFO_NAME, CRQ_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 29, VALUE_OPT_NO_CRQ_EXTENSIONS,
+     /* equiv idx, value */ 29, VALUE_OPT_NO_CRQ_EXTENSIONS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ NO_CRQ_EXTENSIONS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --no-crq-extensions */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ NO_CRQ_EXTENSIONS_DESC, NO_CRQ_EXTENSIONS_NAME, 
NO_CRQ_EXTENSIONS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 30, VALUE_OPT_P12_INFO,
+     /* equiv idx, value */ 30, VALUE_OPT_P12_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ P12_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --p12-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ P12_INFO_DESC, P12_INFO_NAME, P12_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 31, VALUE_OPT_P7_INFO,
+     /* equiv idx, value */ 31, VALUE_OPT_P7_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ P7_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --p7-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ P7_INFO_DESC, P7_INFO_NAME, P7_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 32, VALUE_OPT_SMIME_TO_P7,
+     /* equiv idx, value */ 32, VALUE_OPT_SMIME_TO_P7,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SMIME_TO_P7_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --smime-to-p7 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SMIME_TO_P7_DESC, SMIME_TO_P7_NAME, 
SMIME_TO_P7_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 33, VALUE_OPT_KEY_INFO,
+     /* equiv idx, value */ 33, VALUE_OPT_KEY_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ KEY_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --key-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ KEY_INFO_DESC, KEY_INFO_NAME, KEY_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 34, VALUE_OPT_PGP_KEY_INFO,
+     /* equiv idx, value */ 34, VALUE_OPT_PGP_KEY_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGP_KEY_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgp-key-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PGP_KEY_INFO_DESC, PGP_KEY_INFO_NAME, 
PGP_KEY_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 35, VALUE_OPT_PUBKEY_INFO,
+     /* equiv idx, value */ 35, VALUE_OPT_PUBKEY_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PUBKEY_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pubkey-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PUBKEY_INFO_DESC, PUBKEY_INFO_NAME, 
PUBKEY_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 36, VALUE_OPT_V1,
+     /* equiv idx, value */ 36, VALUE_OPT_V1,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ V1_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --v1 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ V1_DESC, V1_NAME, V1_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 37, VALUE_OPT_TO_P12,
+     /* equiv idx, value */ 37, VALUE_OPT_TO_P12,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ TO_P12_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --to-p12 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ aTo_P12MustList, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ TO_P12_DESC, TO_P12_NAME, TO_P12_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 38, VALUE_OPT_TO_P8,
+     /* equiv idx, value */ 38, VALUE_OPT_TO_P8,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ TO_P8_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --to-p8 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ TO_P8_DESC, TO_P8_NAME, TO_P8_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 39, VALUE_OPT_PKCS8,
+     /* equiv idx, value */ 39, VALUE_OPT_PKCS8,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PKCS8_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pkcs8 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 40, VALUE_OPT_RSA,
+     /* equiv idx, value */ 40, VALUE_OPT_RSA,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ RSA_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --rsa */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ RSA_DESC, RSA_NAME, RSA_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 41, VALUE_OPT_DSA,
+     /* equiv idx, value */ 41, VALUE_OPT_DSA,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DSA_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --dsa */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DSA_DESC, DSA_NAME, DSA_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 42, VALUE_OPT_ECC,
+     /* equiv idx, value */ 42, VALUE_OPT_ECC,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ ECC_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --ecc */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ ECC_DESC, ECC_NAME, ECC_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 43, VALUE_OPT_HASH,
+     /* equiv idx, value */ 43, VALUE_OPT_HASH,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ HASH_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --hash */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ HASH_DESC, HASH_NAME, HASH_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 44, VALUE_OPT_INDER,
+     /* equiv idx, value */ 44, VALUE_OPT_INDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --inder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
+     /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
+
+  {  /* entry idx, value */ 45, VALUE_OPT_INRAW,
+     /* equiv idx, value */ 45, VALUE_OPT_INRAW,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INRAW_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --inraw */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptInraw,
+     /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name,
+     /* disablement strs */ 0, 0 },
+
+  {  /* entry idx, value */ 46, VALUE_OPT_OUTDER,
+     /* equiv idx, value */ 46, VALUE_OPT_OUTDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OUTDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --outder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ OUTDER_DESC, OUTDER_NAME, OUTDER_name,
+     /* disablement strs */ NOT_OUTDER_name, NOT_OUTDER_PFX },
+
+  {  /* entry idx, value */ 47, VALUE_OPT_OUTRAW,
+     /* equiv idx, value */ 47, VALUE_OPT_OUTRAW,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OUTRAW_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --outraw */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptOutraw,
+     /* desc, NAME, name */ OUTRAW_DESC, OUTRAW_NAME, OUTRAW_name,
+     /* disablement strs */ 0, 0 },
+
+  {  /* entry idx, value */ 48, VALUE_OPT_BITS,
+     /* equiv idx, value */ 48, VALUE_OPT_BITS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ BITS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --bits */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ optionNumericVal,
+     /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 49, VALUE_OPT_SEC_PARAM,
+     /* equiv idx, value */ 49, VALUE_OPT_SEC_PARAM,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SEC_PARAM_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --sec-param */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 50, VALUE_OPT_DISABLE_QUICK_RANDOM,
+     /* equiv idx, value */ 50, VALUE_OPT_DISABLE_QUICK_RANDOM,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DISABLE_QUICK_RANDOM_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --disable-quick-random */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DISABLE_QUICK_RANDOM_DESC, 
DISABLE_QUICK_RANDOM_NAME, DISABLE_QUICK_RANDOM_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 51, VALUE_OPT_TEMPLATE,
+     /* equiv idx, value */ 51, VALUE_OPT_TEMPLATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ TEMPLATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --template */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptTemplate,
+     /* desc, NAME, name */ TEMPLATE_DESC, TEMPLATE_NAME, TEMPLATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 52, VALUE_OPT_PKCS_CIPHER,
+     /* equiv idx, value */ 52, VALUE_OPT_PKCS_CIPHER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PKCS_CIPHER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pkcs-cipher */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PKCS_CIPHER_DESC, PKCS_CIPHER_NAME, 
PKCS_CIPHER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the certtool Option Environment
+ */
+#define zPROGNAME       (certtool_opt_strs+4209)
+#define zUsageTitle     (certtool_opt_strs+4218)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (certtool_opt_strs+4325)
+#define zExplain        (certtool_opt_strs+4344)
+#define zDetail         (certtool_opt_strs+4347)
+#define zFullVersion    (certtool_opt_strs+4521)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define certtool_full_usage (NULL)
+
+#define certtool_short_usage (certtool_opt_strs+4540)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&certtoolOptions, CERTTOOL_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the infile option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-request option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the inraw option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER);
+    if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
+        USAGE(CERTTOOL_EXIT_FAILURE);
+
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the outraw option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptOutraw(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_OUTDER);
+    if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
+        USAGE(CERTTOOL_EXIT_FAILURE);
+
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the template option.
+ *
+ * @param pOptions the certtool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptTemplate(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with certtool.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged certtool
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define certtool_packager_info NULL
+#else
+static char const certtool_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport certtool bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for certtool.  The one structure that
+ * binds them all.
+ */
+tOptions certtoolOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NEGATIONS
+    + OPTPROC_NO_ARGS
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    56 /* full option count */, 53 /* user option count */,
+    certtool_full_usage, certtool_short_usage,
+    NULL, NULL,
+    PKGDATADIR, certtool_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(CERTTOOL_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the certtoolOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &certtoolOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        certtoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* certtool-args.c ends here */
diff --git a/src/certtool-args.def b/src/certtool-args.def
index 40ad4bb..a43ff09 100644
--- a/src/certtool-args.def
+++ b/src/certtool-args.def
@@ -551,6 +551,9 @@ expiration_days = 700
 #dns_name = "www.none.org"
 #dns_name = "www.morethanone.org"
 
+# A subject alternative name URI
+#uri = "http://www.example.com";
+
 # An IP address in case of a server.
 #ip_address = "192.168.1.1"
 
diff --git a/src/certtool-args.h b/src/certtool-args.h
new file mode 100644
index 0000000..49e7b11
--- /dev/null
+++ b/src/certtool-args.h
@@ -0,0 +1,289 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (certtool-args.h)
+ *  
+ *  It has been AutoGen-ed  May 14, 2012 at 05:25:36 PM by AutoGen 5.16
+ *  From the definitions    certtool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the certtool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The certtool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  certtool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  certtool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the certtool program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_CERTTOOL_ARGS_H_GUARD
+#define AUTOOPTS_CERTTOOL_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG                 =  0,
+    INDEX_OPT_INFILE                =  1,
+    INDEX_OPT_OUTFILE               =  2,
+    INDEX_OPT_GENERATE_SELF_SIGNED  =  3,
+    INDEX_OPT_GENERATE_CERTIFICATE  =  4,
+    INDEX_OPT_GENERATE_PROXY        =  5,
+    INDEX_OPT_GENERATE_CRL          =  6,
+    INDEX_OPT_UPDATE_CERTIFICATE    =  7,
+    INDEX_OPT_GENERATE_PRIVKEY      =  8,
+    INDEX_OPT_GENERATE_REQUEST      =  9,
+    INDEX_OPT_VERIFY_CHAIN          = 10,
+    INDEX_OPT_VERIFY                = 11,
+    INDEX_OPT_VERIFY_CRL            = 12,
+    INDEX_OPT_GENERATE_DH_PARAMS    = 13,
+    INDEX_OPT_GET_DH_PARAMS         = 14,
+    INDEX_OPT_DH_INFO               = 15,
+    INDEX_OPT_LOAD_PRIVKEY          = 16,
+    INDEX_OPT_LOAD_PUBKEY           = 17,
+    INDEX_OPT_LOAD_REQUEST          = 18,
+    INDEX_OPT_LOAD_CERTIFICATE      = 19,
+    INDEX_OPT_LOAD_CA_PRIVKEY       = 20,
+    INDEX_OPT_LOAD_CA_CERTIFICATE   = 21,
+    INDEX_OPT_PASSWORD              = 22,
+    INDEX_OPT_CERTIFICATE_INFO      = 23,
+    INDEX_OPT_CERTIFICATE_PUBKEY    = 24,
+    INDEX_OPT_PGP_CERTIFICATE_INFO  = 25,
+    INDEX_OPT_PGP_RING_INFO         = 26,
+    INDEX_OPT_CRL_INFO              = 27,
+    INDEX_OPT_CRQ_INFO              = 28,
+    INDEX_OPT_NO_CRQ_EXTENSIONS     = 29,
+    INDEX_OPT_P12_INFO              = 30,
+    INDEX_OPT_P7_INFO               = 31,
+    INDEX_OPT_SMIME_TO_P7           = 32,
+    INDEX_OPT_KEY_INFO              = 33,
+    INDEX_OPT_PGP_KEY_INFO          = 34,
+    INDEX_OPT_PUBKEY_INFO           = 35,
+    INDEX_OPT_V1                    = 36,
+    INDEX_OPT_TO_P12                = 37,
+    INDEX_OPT_TO_P8                 = 38,
+    INDEX_OPT_PKCS8                 = 39,
+    INDEX_OPT_RSA                   = 40,
+    INDEX_OPT_DSA                   = 41,
+    INDEX_OPT_ECC                   = 42,
+    INDEX_OPT_HASH                  = 43,
+    INDEX_OPT_INDER                 = 44,
+    INDEX_OPT_INRAW                 = 45,
+    INDEX_OPT_OUTDER                = 46,
+    INDEX_OPT_OUTRAW                = 47,
+    INDEX_OPT_BITS                  = 48,
+    INDEX_OPT_SEC_PARAM             = 49,
+    INDEX_OPT_DISABLE_QUICK_RANDOM  = 50,
+    INDEX_OPT_TEMPLATE              = 51,
+    INDEX_OPT_PKCS_CIPHER           = 52,
+    INDEX_OPT_VERSION               = 53,
+    INDEX_OPT_HELP                  = 54,
+    INDEX_OPT_MORE_HELP             = 55
+} teOptIndex;
+
+#define OPTION_CT    56
+#define CERTTOOL_VERSION       "@VERSION@"
+#define CERTTOOL_FULL_VERSION  "certtool @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (certtoolOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of certtool exit codes
+ */
+typedef enum {
+    CERTTOOL_EXIT_SUCCESS = 0,
+    CERTTOOL_EXIT_FAILURE = 1,
+    CERTTOOL_EXIT_LIBOPTS_FAILURE = 70
+} certtool_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_INFILE         1
+#define VALUE_OPT_OUTFILE        2
+#define VALUE_OPT_GENERATE_SELF_SIGNED 's'
+#define VALUE_OPT_GENERATE_CERTIFICATE 'c'
+#define VALUE_OPT_GENERATE_PROXY 5
+#define VALUE_OPT_GENERATE_CRL   6
+#define VALUE_OPT_UPDATE_CERTIFICATE 'u'
+#define VALUE_OPT_GENERATE_PRIVKEY 'p'
+#define VALUE_OPT_GENERATE_REQUEST 'q'
+#define VALUE_OPT_VERIFY_CHAIN   'e'
+#define VALUE_OPT_VERIFY         11
+#define VALUE_OPT_VERIFY_CRL     12
+#define VALUE_OPT_GENERATE_DH_PARAMS 13
+#define VALUE_OPT_GET_DH_PARAMS  14
+#define VALUE_OPT_DH_INFO        15
+#define VALUE_OPT_LOAD_PRIVKEY   16
+#define VALUE_OPT_LOAD_PUBKEY    17
+#define VALUE_OPT_LOAD_REQUEST   18
+#define VALUE_OPT_LOAD_CERTIFICATE 19
+#define VALUE_OPT_LOAD_CA_PRIVKEY 20
+#define VALUE_OPT_LOAD_CA_CERTIFICATE 21
+#define VALUE_OPT_PASSWORD       22
+#define VALUE_OPT_CERTIFICATE_INFO 'i'
+#define VALUE_OPT_CERTIFICATE_PUBKEY 24
+#define VALUE_OPT_PGP_CERTIFICATE_INFO 25
+#define VALUE_OPT_PGP_RING_INFO  26
+#define VALUE_OPT_CRL_INFO       'l'
+#define VALUE_OPT_CRQ_INFO       28
+#define VALUE_OPT_NO_CRQ_EXTENSIONS 29
+#define VALUE_OPT_P12_INFO       30
+#define VALUE_OPT_P7_INFO        31
+#define VALUE_OPT_SMIME_TO_P7    32
+#define VALUE_OPT_KEY_INFO       'k'
+#define VALUE_OPT_PGP_KEY_INFO   130
+#define VALUE_OPT_PUBKEY_INFO    131
+#define VALUE_OPT_V1             132
+#define VALUE_OPT_TO_P12         133
+#define VALUE_OPT_TO_P8          134
+#define VALUE_OPT_PKCS8          '8'
+#define VALUE_OPT_RSA            136
+#define VALUE_OPT_DSA            137
+#define VALUE_OPT_ECC            138
+#define VALUE_OPT_HASH           139
+#define VALUE_OPT_INDER          140
+#define VALUE_OPT_INRAW          141
+#define VALUE_OPT_OUTDER         142
+#define VALUE_OPT_OUTRAW         143
+#define VALUE_OPT_BITS           144
+
+#define OPT_VALUE_BITS           (DESC(BITS).optArg.argInt)
+#define VALUE_OPT_SEC_PARAM      145
+#define VALUE_OPT_DISABLE_QUICK_RANDOM 146
+#define VALUE_OPT_TEMPLATE       147
+#define VALUE_OPT_PKCS_CIPHER    148
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(certtoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(certtoolOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                certtoolOptions.curOptIdx = (n); \
+                certtoolOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*certtoolOptions.pUsageProc)(&certtoolOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the certtool option descriptor.
+ */
+extern tOptions certtoolOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(certtoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(certtoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(certtoolOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(certtoolOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_CERTTOOL_ARGS_H_GUARD */
+/* certtool-args.h ends here */
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c
index d47ef76..d4aeefa 100644
--- a/src/certtool-cfg.c
+++ b/src/certtool-cfg.c
@@ -63,6 +63,7 @@ typedef struct _cfg_ctx
   char *country;
   char **dc;
   char **dns_name;
+  char **uri;
   char **ip_addr;
   char **email;
   char **dn_oid;
@@ -233,6 +234,8 @@ template_parse (const char *template)
   
   READ_MULTI_LINE("dc", cfg.dc);
   READ_MULTI_LINE("dns_name", cfg.dns_name);
+  READ_MULTI_LINE("uri", cfg.uri);
+
   READ_MULTI_LINE("ip_address", cfg.ip_addr);
   READ_MULTI_LINE("email", cfg.email);
   READ_MULTI_LINE("key_purpose_oid", cfg.key_purpose_oids);
@@ -1208,6 +1211,64 @@ get_dns_name_set (int type, void *crt)
     }
 }
 
+void
+get_uri_set (int type, void *crt)
+{
+  int ret = 0, i;
+
+  if (batch)
+    {
+      if (!cfg.uri)
+        return;
+
+      for (i = 0; cfg.uri[i] != NULL; i++)
+        {
+          if (type == TYPE_CRT)
+            ret =
+              gnutls_x509_crt_set_subject_alt_name (crt, GNUTLS_SAN_URI,
+                                                    cfg.uri[i],
+                                                    strlen (cfg.uri[i]),
+                                                    GNUTLS_FSAN_APPEND);
+          else
+            ret =
+              gnutls_x509_crq_set_subject_alt_name (crt, GNUTLS_SAN_URI,
+                                                    cfg.uri[i],
+                                                    strlen (cfg.uri[i]),
+                                                    GNUTLS_FSAN_APPEND);
+
+          if (ret < 0)
+            break;
+        }
+    }
+  else
+    {
+      const char *p;
+
+      do
+        {
+          p =
+            read_str ("Enter a URI of the subject of the certificate: ");
+          if (!p)
+            return;
+
+          if (type == TYPE_CRT)
+            ret = gnutls_x509_crt_set_subject_alt_name
+              (crt, GNUTLS_SAN_URI, p, strlen (p), GNUTLS_FSAN_APPEND);
+          else
+            ret = gnutls_x509_crq_set_subject_alt_name
+              (crt, GNUTLS_SAN_URI, p, strlen (p), GNUTLS_FSAN_APPEND);
+        }
+      while (p);
+    }
+
+  if (ret < 0)
+    {
+      fprintf (stderr, "set_subject_alt_name: %s\n", gnutls_strerror (ret));
+      exit (1);
+    }
+}
+
+
 
 int
 get_sign_status (int server)
diff --git a/src/certtool-cfg.h b/src/certtool-cfg.h
index 5181425..878ecac 100644
--- a/src/certtool-cfg.h
+++ b/src/certtool-cfg.h
@@ -67,6 +67,7 @@ int get_encrypt_status (int server);
 int get_sign_status (int server);
 void get_ip_addr_set (int type, void *crt);
 void get_dns_name_set (int type, void *crt);
+void get_uri_set (int type, void *crt);
 void get_email_set (int type, void *crt);
 int get_ipsec_ike_status (void);
 void get_dc_set (int type, void *crt);
diff --git a/src/certtool.c b/src/certtool.c
index 58ebcd1..59d6155 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -484,11 +484,10 @@ generate_certificate (gnutls_privkey_t * ret_key,
 
       is_ike = get_ipsec_ike_status ();
       server = get_tls_server_status ();
-      if ((server != 0 && !proxy) || is_ike)
-        {
-          get_dns_name_set (TYPE_CRT, crt);
-          get_ip_addr_set (TYPE_CRT, crt);
-        }
+
+      get_dns_name_set (TYPE_CRT, crt);
+      get_uri_set (TYPE_CRT, crt);
+      get_ip_addr_set (TYPE_CRT, crt);
 
       if (server != 0)
         {
@@ -1864,6 +1863,7 @@ generate_request (common_info_st * cinfo)
   get_oid_crq_set (crq);
 
   get_dns_name_set (TYPE_CRQ, crq);
+  get_uri_set (TYPE_CRQ, crq);
   get_ip_addr_set (TYPE_CRQ, crq);
   get_email_set (TYPE_CRQ, crq);
 
diff --git a/src/cli-args.c b/src/cli-args.c
new file mode 100644
index 0000000..87c3052
--- /dev/null
+++ b/src/cli-args.c
@@ -0,0 +1,1423 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (cli-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    cli-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-cli author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-cli program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-cli is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-cli is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "cli-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (gnutls_cli_opt_strs+0)
+#define zLicenseDescrip (gnutls_cli_opt_strs+281)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  gnutls-cli option static const strings
+ */
+static char const gnutls_cli_opt_strs[3376] =
+/*     0 */ "gnutls-cli @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   281 */ "gnutls-cli is free software: you can redistribute it and/or 
modify it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "gnutls-cli is distributed in the hope that it will be useful, but 
WITHOUT\n"
+            "ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or\n"
+            "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public 
License for\n"
+            "more details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   890 */ "Enable debugging.\0"
+/*   908 */ "DEBUG\0"
+/*   914 */ "debug\0"
+/*   920 */ "More verbose output\0"
+/*   940 */ "VERBOSE\0"
+/*   948 */ "verbose\0"
+/*   956 */ "Enable trust on first use authentication\0"
+/*   997 */ "TOFU\0"
+/*  1002 */ "no-tofu\0"
+/*  1010 */ "no\0"
+/*  1013 */ "Enable OCSP certificate verification\0"
+/*  1050 */ "OCSP\0"
+/*  1055 */ "no-ocsp\0"
+/*  1063 */ "Establish a session and resume\0"
+/*  1094 */ "RESUME\0"
+/*  1101 */ "resume\0"
+/*  1108 */ "Establish a session and rehandshake\0"
+/*  1144 */ "REHANDSHAKE\0"
+/*  1156 */ "rehandshake\0"
+/*  1168 */ "Don't accept session tickets\0"
+/*  1197 */ "NOTICKET\0"
+/*  1206 */ "noticket\0"
+/*  1215 */ "Connect, establish a plain session and start TLS.\0"
+/*  1265 */ "STARTTLS\0"
+/*  1274 */ "starttls\0"
+/*  1283 */ "Use DTLS (datagram TLS) over UDP\0"
+/*  1316 */ "UDP\0"
+/*  1320 */ "udp\0"
+/*  1324 */ "Set MTU for datagram TLS\0"
+/*  1349 */ "MTU\0"
+/*  1353 */ "mtu\0"
+/*  1357 */ "Send CR LF instead of LF\0"
+/*  1382 */ "CRLF\0"
+/*  1387 */ "crlf\0"
+/*  1392 */ "Use DER format for certificates to read from\0"
+/*  1437 */ "X509FMTDER\0"
+/*  1448 */ "x509fmtder\0"
+/*  1459 */ "Send the openpgp fingerprint, instead of the key\0"
+/*  1508 */ "FINGERPRINT\0"
+/*  1520 */ "fingerprint\0"
+/*  1532 */ "Disable all the TLS extensions\0"
+/*  1563 */ "DISABLE_EXTENSIONS\0"
+/*  1582 */ "disable-extensions\0"
+/*  1601 */ "Print peer's certificate in PEM format\0"
+/*  1640 */ "PRINT_CERT\0"
+/*  1651 */ "print-cert\0"
+/*  1662 */ "The maximum record size to advertize\0"
+/*  1699 */ "RECORDSIZE\0"
+/*  1710 */ "recordsize\0"
+/*  1721 */ "Priorities string\0"
+/*  1739 */ "PRIORITY\0"
+/*  1748 */ "priority\0"
+/*  1757 */ "Certificate file or PKCS #11 URL to use\0"
+/*  1797 */ "X509CAFILE\0"
+/*  1808 */ "x509cafile\0"
+/*  1819 */ "CRL file to use\0"
+/*  1835 */ "X509CRLFILE\0"
+/*  1847 */ "x509crlfile\0"
+/*  1859 */ "PGP Key file to use\0"
+/*  1879 */ "PGPKEYFILE\0"
+/*  1890 */ "pgpkeyfile\0"
+/*  1901 */ "PGP Key ring file to use\0"
+/*  1926 */ "PGPKEYRING\0"
+/*  1937 */ "pgpkeyring\0"
+/*  1948 */ "PGP Public Key (certificate) file to use\0"
+/*  1989 */ "PGPCERTFILE\0"
+/*  2001 */ "pgpcertfile\0"
+/*  2013 */ "X.509 key file or PKCS #11 URL to use\0"
+/*  2051 */ "X509KEYFILE\0"
+/*  2063 */ "x509keyfile\0"
+/*  2075 */ "X.509 Certificate file or PKCS #11 URL to use\0"
+/*  2121 */ "X509CERTFILE\0"
+/*  2134 */ "x509certfile\0"
+/*  2147 */ "PGP subkey to use (hex or auto)\0"
+/*  2179 */ "PGPSUBKEY\0"
+/*  2189 */ "pgpsubkey\0"
+/*  2199 */ "SRP username to use\0"
+/*  2219 */ "SRPUSERNAME\0"
+/*  2231 */ "srpusername\0"
+/*  2243 */ "SRP password to use\0"
+/*  2263 */ "SRPPASSWD\0"
+/*  2273 */ "srppasswd\0"
+/*  2283 */ "PSK username to use\0"
+/*  2303 */ "PSKUSERNAME\0"
+/*  2315 */ "pskusername\0"
+/*  2327 */ "PSK key (in hex) to use\0"
+/*  2351 */ "PSKKEY\0"
+/*  2358 */ "pskkey\0"
+/*  2365 */ "The port or service to connect to\0"
+/*  2399 */ "PORT\0"
+/*  2404 */ "port\0"
+/*  2409 */ "Don't abort program if server certificate can't be validated\0"
+/*  2470 */ "INSECURE\0"
+/*  2479 */ "insecure\0"
+/*  2488 */ "Benchmark individual ciphers\0"
+/*  2517 */ "BENCHMARK_CIPHERS\0"
+/*  2535 */ "benchmark-ciphers\0"
+/*  2553 */ "Benchmark individual software ciphers (no hw acceleration)\0"
+/*  2612 */ "BENCHMARK_SOFT_CIPHERS\0"
+/*  2635 */ "benchmark-soft-ciphers\0"
+/*  2658 */ "Benchmark ciphers and key exchange methods in TLS\0"
+/*  2708 */ "BENCHMARK_TLS\0"
+/*  2722 */ "benchmark-tls\0"
+/*  2736 */ "Print a list of the supported algorithms and modes\0"
+/*  2787 */ "LIST\0"
+/*  2792 */ "list\0"
+/*  2797 */ "Display extended usage information and exit\0"
+/*  2841 */ "help\0"
+/*  2846 */ "Extended usage information passed thru pager\0"
+/*  2891 */ "more-help\0"
+/*  2901 */ "Output version information and exit\0"
+/*  2937 */ "version\0"
+/*  2945 */ "GNUTLS_CLI\0"
+/*  2956 */ "gnutls-cli - GnuTLS client - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
[hostname]\n\0"
+/*  3069 */ "address@hidden"
+/*  3088 */ "\n\n\0"
+/*  3091 */ "\n"
+            "Simple client program to set up a TLS connection to some other 
computer.  It\n"
+            "sets up a TLS connection and forwards data from the standard 
input to the\n"
+            "secured socket and vice versa.\n\0"
+/*  3275 */ "gnutls-cli @address@hidden"
+/*  3296 */ "Usage: gnutls-cli [options] hostname\n"
+            "gnutls-cli --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (gnutls_cli_opt_strs+890)
+#define DEBUG_NAME      (gnutls_cli_opt_strs+908)
+#define DEBUG_name      (gnutls_cli_opt_strs+914)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  verbose option description:
+ */
+#define VERBOSE_DESC      (gnutls_cli_opt_strs+920)
+#define VERBOSE_NAME      (gnutls_cli_opt_strs+940)
+#define VERBOSE_name      (gnutls_cli_opt_strs+948)
+#define VERBOSE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  tofu option description:
+ */
+#define TOFU_DESC      (gnutls_cli_opt_strs+956)
+#define TOFU_NAME      (gnutls_cli_opt_strs+997)
+#define NOT_TOFU_name  (gnutls_cli_opt_strs+1002)
+#define NOT_TOFU_PFX   (gnutls_cli_opt_strs+1010)
+#define TOFU_name      (NOT_TOFU_name + 3)
+#define TOFU_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  ocsp option description:
+ */
+#define OCSP_DESC      (gnutls_cli_opt_strs+1013)
+#define OCSP_NAME      (gnutls_cli_opt_strs+1050)
+#define NOT_OCSP_name  (gnutls_cli_opt_strs+1055)
+#define NOT_OCSP_PFX   (gnutls_cli_opt_strs+1010)
+#define OCSP_name      (NOT_OCSP_name + 3)
+#define OCSP_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  resume option description:
+ */
+#define RESUME_DESC      (gnutls_cli_opt_strs+1063)
+#define RESUME_NAME      (gnutls_cli_opt_strs+1094)
+#define RESUME_name      (gnutls_cli_opt_strs+1101)
+#define RESUME_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  rehandshake option description:
+ */
+#define REHANDSHAKE_DESC      (gnutls_cli_opt_strs+1108)
+#define REHANDSHAKE_NAME      (gnutls_cli_opt_strs+1144)
+#define REHANDSHAKE_name      (gnutls_cli_opt_strs+1156)
+#define REHANDSHAKE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  noticket option description:
+ */
+#define NOTICKET_DESC      (gnutls_cli_opt_strs+1168)
+#define NOTICKET_NAME      (gnutls_cli_opt_strs+1197)
+#define NOTICKET_name      (gnutls_cli_opt_strs+1206)
+#define NOTICKET_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  starttls option description:
+ */
+#define STARTTLS_DESC      (gnutls_cli_opt_strs+1215)
+#define STARTTLS_NAME      (gnutls_cli_opt_strs+1265)
+#define STARTTLS_name      (gnutls_cli_opt_strs+1274)
+#define STARTTLS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  udp option description:
+ */
+#define UDP_DESC      (gnutls_cli_opt_strs+1283)
+#define UDP_NAME      (gnutls_cli_opt_strs+1316)
+#define UDP_name      (gnutls_cli_opt_strs+1320)
+#define UDP_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  mtu option description:
+ */
+#define MTU_DESC      (gnutls_cli_opt_strs+1324)
+#define MTU_NAME      (gnutls_cli_opt_strs+1349)
+#define MTU_name      (gnutls_cli_opt_strs+1353)
+#define MTU_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  crlf option description:
+ */
+#define CRLF_DESC      (gnutls_cli_opt_strs+1357)
+#define CRLF_NAME      (gnutls_cli_opt_strs+1382)
+#define CRLF_name      (gnutls_cli_opt_strs+1387)
+#define CRLF_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  x509fmtder option description:
+ */
+#define X509FMTDER_DESC      (gnutls_cli_opt_strs+1392)
+#define X509FMTDER_NAME      (gnutls_cli_opt_strs+1437)
+#define X509FMTDER_name      (gnutls_cli_opt_strs+1448)
+#define X509FMTDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  fingerprint option description:
+ */
+#define FINGERPRINT_DESC      (gnutls_cli_opt_strs+1459)
+#define FINGERPRINT_NAME      (gnutls_cli_opt_strs+1508)
+#define FINGERPRINT_name      (gnutls_cli_opt_strs+1520)
+#define FINGERPRINT_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  disable-extensions option description:
+ */
+#define DISABLE_EXTENSIONS_DESC      (gnutls_cli_opt_strs+1532)
+#define DISABLE_EXTENSIONS_NAME      (gnutls_cli_opt_strs+1563)
+#define DISABLE_EXTENSIONS_name      (gnutls_cli_opt_strs+1582)
+#define DISABLE_EXTENSIONS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  print-cert option description:
+ */
+#define PRINT_CERT_DESC      (gnutls_cli_opt_strs+1601)
+#define PRINT_CERT_NAME      (gnutls_cli_opt_strs+1640)
+#define PRINT_CERT_name      (gnutls_cli_opt_strs+1651)
+#define PRINT_CERT_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  recordsize option description:
+ */
+#define RECORDSIZE_DESC      (gnutls_cli_opt_strs+1662)
+#define RECORDSIZE_NAME      (gnutls_cli_opt_strs+1699)
+#define RECORDSIZE_name      (gnutls_cli_opt_strs+1710)
+#define RECORDSIZE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  priority option description:
+ */
+#define PRIORITY_DESC      (gnutls_cli_opt_strs+1721)
+#define PRIORITY_NAME      (gnutls_cli_opt_strs+1739)
+#define PRIORITY_name      (gnutls_cli_opt_strs+1748)
+#define PRIORITY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509cafile option description:
+ */
+#define X509CAFILE_DESC      (gnutls_cli_opt_strs+1757)
+#define X509CAFILE_NAME      (gnutls_cli_opt_strs+1797)
+#define X509CAFILE_name      (gnutls_cli_opt_strs+1808)
+#define X509CAFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509crlfile option description:
+ */
+#define X509CRLFILE_DESC      (gnutls_cli_opt_strs+1819)
+#define X509CRLFILE_NAME      (gnutls_cli_opt_strs+1835)
+#define X509CRLFILE_name      (gnutls_cli_opt_strs+1847)
+#define X509CRLFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpkeyfile option description:
+ */
+#define PGPKEYFILE_DESC      (gnutls_cli_opt_strs+1859)
+#define PGPKEYFILE_NAME      (gnutls_cli_opt_strs+1879)
+#define PGPKEYFILE_name      (gnutls_cli_opt_strs+1890)
+#define PGPKEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpkeyring option description:
+ */
+#define PGPKEYRING_DESC      (gnutls_cli_opt_strs+1901)
+#define PGPKEYRING_NAME      (gnutls_cli_opt_strs+1926)
+#define PGPKEYRING_name      (gnutls_cli_opt_strs+1937)
+#define PGPKEYRING_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpcertfile option description:
+ */
+#define PGPCERTFILE_DESC      (gnutls_cli_opt_strs+1948)
+#define PGPCERTFILE_NAME      (gnutls_cli_opt_strs+1989)
+#define PGPCERTFILE_name      (gnutls_cli_opt_strs+2001)
+#define PGPCERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  x509keyfile option description:
+ */
+#define X509KEYFILE_DESC      (gnutls_cli_opt_strs+2013)
+#define X509KEYFILE_NAME      (gnutls_cli_opt_strs+2051)
+#define X509KEYFILE_name      (gnutls_cli_opt_strs+2063)
+#define X509KEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509certfile option description:
+ */
+#define X509CERTFILE_DESC      (gnutls_cli_opt_strs+2075)
+#define X509CERTFILE_NAME      (gnutls_cli_opt_strs+2121)
+#define X509CERTFILE_name      (gnutls_cli_opt_strs+2134)
+#define X509CERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  pgpsubkey option description:
+ */
+#define PGPSUBKEY_DESC      (gnutls_cli_opt_strs+2147)
+#define PGPSUBKEY_NAME      (gnutls_cli_opt_strs+2179)
+#define PGPSUBKEY_name      (gnutls_cli_opt_strs+2189)
+#define PGPSUBKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  srpusername option description:
+ */
+#define SRPUSERNAME_DESC      (gnutls_cli_opt_strs+2199)
+#define SRPUSERNAME_NAME      (gnutls_cli_opt_strs+2219)
+#define SRPUSERNAME_name      (gnutls_cli_opt_strs+2231)
+#define SRPUSERNAME_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  srppasswd option description:
+ */
+#define SRPPASSWD_DESC      (gnutls_cli_opt_strs+2243)
+#define SRPPASSWD_NAME      (gnutls_cli_opt_strs+2263)
+#define SRPPASSWD_name      (gnutls_cli_opt_strs+2273)
+#define SRPPASSWD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  pskusername option description:
+ */
+#define PSKUSERNAME_DESC      (gnutls_cli_opt_strs+2283)
+#define PSKUSERNAME_NAME      (gnutls_cli_opt_strs+2303)
+#define PSKUSERNAME_name      (gnutls_cli_opt_strs+2315)
+#define PSKUSERNAME_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  pskkey option description:
+ */
+#define PSKKEY_DESC      (gnutls_cli_opt_strs+2327)
+#define PSKKEY_NAME      (gnutls_cli_opt_strs+2351)
+#define PSKKEY_name      (gnutls_cli_opt_strs+2358)
+#define PSKKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  port option description:
+ */
+#define PORT_DESC      (gnutls_cli_opt_strs+2365)
+#define PORT_NAME      (gnutls_cli_opt_strs+2399)
+#define PORT_name      (gnutls_cli_opt_strs+2404)
+#define PORT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  insecure option description:
+ */
+#define INSECURE_DESC      (gnutls_cli_opt_strs+2409)
+#define INSECURE_NAME      (gnutls_cli_opt_strs+2470)
+#define INSECURE_name      (gnutls_cli_opt_strs+2479)
+#define INSECURE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  benchmark-ciphers option description:
+ */
+#define BENCHMARK_CIPHERS_DESC      (gnutls_cli_opt_strs+2488)
+#define BENCHMARK_CIPHERS_NAME      (gnutls_cli_opt_strs+2517)
+#define BENCHMARK_CIPHERS_name      (gnutls_cli_opt_strs+2535)
+#define BENCHMARK_CIPHERS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  benchmark-soft-ciphers option description:
+ */
+#define BENCHMARK_SOFT_CIPHERS_DESC      (gnutls_cli_opt_strs+2553)
+#define BENCHMARK_SOFT_CIPHERS_NAME      (gnutls_cli_opt_strs+2612)
+#define BENCHMARK_SOFT_CIPHERS_name      (gnutls_cli_opt_strs+2635)
+#define BENCHMARK_SOFT_CIPHERS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  benchmark-tls option description:
+ */
+#define BENCHMARK_TLS_DESC      (gnutls_cli_opt_strs+2658)
+#define BENCHMARK_TLS_NAME      (gnutls_cli_opt_strs+2708)
+#define BENCHMARK_TLS_name      (gnutls_cli_opt_strs+2722)
+#define BENCHMARK_TLS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list option description:
+ */
+#define LIST_DESC      (gnutls_cli_opt_strs+2736)
+#define LIST_NAME      (gnutls_cli_opt_strs+2787)
+#define LIST_name      (gnutls_cli_opt_strs+2792)
+#define LIST_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (gnutls_cli_opt_strs+2797)
+#define HELP_name       (gnutls_cli_opt_strs+2841)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (gnutls_cli_opt_strs+2846)
+#define MORE_HELP_name  (gnutls_cli_opt_strs+2891)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (gnutls_cli_opt_strs+2901)
+#define VER_name        (gnutls_cli_opt_strs+2937)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug,       doOptMtu,         doOptPgpcertfile, doOptPgpkeyfile,
+    doOptPgpkeyring,  doOptRecordsize,  doOptX509crlfile, doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the gnutls-cli Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the gnutls-cli program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equiv idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, NOLIMIT, 0,
+     /* opt state flags  */ VERBOSE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verbose */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_TOFU,
+     /* equiv idx, value */ 2, VALUE_OPT_TOFU,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ TOFU_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --tofu */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ TOFU_DESC, TOFU_NAME, TOFU_name,
+     /* disablement strs */ NOT_TOFU_name, NOT_TOFU_PFX },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_OCSP,
+     /* equiv idx, value */ 3, VALUE_OPT_OCSP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OCSP_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --ocsp */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ OCSP_DESC, OCSP_NAME, OCSP_name,
+     /* disablement strs */ NOT_OCSP_name, NOT_OCSP_PFX },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_RESUME,
+     /* equiv idx, value */ 4, VALUE_OPT_RESUME,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ RESUME_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --resume */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ RESUME_DESC, RESUME_NAME, RESUME_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_REHANDSHAKE,
+     /* equiv idx, value */ 5, VALUE_OPT_REHANDSHAKE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ REHANDSHAKE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --rehandshake */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ REHANDSHAKE_DESC, REHANDSHAKE_NAME, 
REHANDSHAKE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_NOTICKET,
+     /* equiv idx, value */ 6, VALUE_OPT_NOTICKET,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ NOTICKET_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --noticket */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_STARTTLS,
+     /* equiv idx, value */ 7, VALUE_OPT_STARTTLS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ STARTTLS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --starttls */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ STARTTLS_DESC, STARTTLS_NAME, STARTTLS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_UDP,
+     /* equiv idx, value */ 8, VALUE_OPT_UDP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ UDP_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --udp */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 9, VALUE_OPT_MTU,
+     /* equiv idx, value */ 9, VALUE_OPT_MTU,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MTU_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --mtu */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptMtu,
+     /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_CRLF,
+     /* equiv idx, value */ 10, VALUE_OPT_CRLF,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CRLF_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --crlf */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_X509FMTDER,
+     /* equiv idx, value */ 11, VALUE_OPT_X509FMTDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509FMTDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509fmtder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 12, VALUE_OPT_FINGERPRINT,
+     /* equiv idx, value */ 12, VALUE_OPT_FINGERPRINT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ FINGERPRINT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --fingerprint */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, 
FINGERPRINT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 13, VALUE_OPT_DISABLE_EXTENSIONS,
+     /* equiv idx, value */ 13, VALUE_OPT_DISABLE_EXTENSIONS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DISABLE_EXTENSIONS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --disable-extensions */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, 
DISABLE_EXTENSIONS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 14, VALUE_OPT_PRINT_CERT,
+     /* equiv idx, value */ 14, VALUE_OPT_PRINT_CERT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PRINT_CERT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --print-cert */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 15, VALUE_OPT_RECORDSIZE,
+     /* equiv idx, value */ 15, VALUE_OPT_RECORDSIZE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ RECORDSIZE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --recordsize */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptRecordsize,
+     /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_PRIORITY,
+     /* equiv idx, value */ 16, VALUE_OPT_PRIORITY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PRIORITY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --priority */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 17, VALUE_OPT_X509CAFILE,
+     /* equiv idx, value */ 17, VALUE_OPT_X509CAFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CAFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509cafile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 18, VALUE_OPT_X509CRLFILE,
+     /* equiv idx, value */ 18, VALUE_OPT_X509CRLFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CRLFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509crlfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptX509crlfile,
+     /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, 
X509CRLFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 19, VALUE_OPT_PGPKEYFILE,
+     /* equiv idx, value */ 19, VALUE_OPT_PGPKEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPKEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpkeyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpkeyfile,
+     /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 20, VALUE_OPT_PGPKEYRING,
+     /* equiv idx, value */ 20, VALUE_OPT_PGPKEYRING,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPKEYRING_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpkeyring */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpkeyring,
+     /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 21, VALUE_OPT_PGPCERTFILE,
+     /* equiv idx, value */ 21, VALUE_OPT_PGPCERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPCERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpcertfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpcertfile,
+     /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, 
PGPCERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 22, VALUE_OPT_X509KEYFILE,
+     /* equiv idx, value */ 22, VALUE_OPT_X509KEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509KEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509keyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, 
X509KEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 23, VALUE_OPT_X509CERTFILE,
+     /* equiv idx, value */ 23, VALUE_OPT_X509CERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509certfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, 
X509CERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 24, VALUE_OPT_PGPSUBKEY,
+     /* equiv idx, value */ 24, VALUE_OPT_PGPSUBKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPSUBKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpsubkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 25, VALUE_OPT_SRPUSERNAME,
+     /* equiv idx, value */ 25, VALUE_OPT_SRPUSERNAME,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRPUSERNAME_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srpusername */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, 
SRPUSERNAME_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 26, VALUE_OPT_SRPPASSWD,
+     /* equiv idx, value */ 26, VALUE_OPT_SRPPASSWD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRPPASSWD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srppasswd */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 27, VALUE_OPT_PSKUSERNAME,
+     /* equiv idx, value */ 27, VALUE_OPT_PSKUSERNAME,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PSKUSERNAME_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pskusername */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, 
PSKUSERNAME_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 28, VALUE_OPT_PSKKEY,
+     /* equiv idx, value */ 28, VALUE_OPT_PSKKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PSKKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pskkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 29, VALUE_OPT_PORT,
+     /* equiv idx, value */ 29, VALUE_OPT_PORT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PORT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --port */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 30, VALUE_OPT_INSECURE,
+     /* equiv idx, value */ 30, VALUE_OPT_INSECURE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INSECURE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --insecure */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 31, VALUE_OPT_BENCHMARK_CIPHERS,
+     /* equiv idx, value */ 31, VALUE_OPT_BENCHMARK_CIPHERS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ BENCHMARK_CIPHERS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --benchmark-ciphers */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, 
BENCHMARK_CIPHERS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 32, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
+     /* equiv idx, value */ 32, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --benchmark-soft-ciphers */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, 
BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 33, VALUE_OPT_BENCHMARK_TLS,
+     /* equiv idx, value */ 33, VALUE_OPT_BENCHMARK_TLS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ BENCHMARK_TLS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --benchmark-tls */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ BENCHMARK_TLS_DESC, BENCHMARK_TLS_NAME, 
BENCHMARK_TLS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 34, VALUE_OPT_LIST,
+     /* equiv idx, value */ 34, VALUE_OPT_LIST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the gnutls-cli Option Environment
+ */
+#define zPROGNAME       (gnutls_cli_opt_strs+2945)
+#define zUsageTitle     (gnutls_cli_opt_strs+2956)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (gnutls_cli_opt_strs+3069)
+#define zExplain        (gnutls_cli_opt_strs+3088)
+#define zDetail         (gnutls_cli_opt_strs+3091)
+#define zFullVersion    (gnutls_cli_opt_strs+3275)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define gnutls_cli_full_usage (NULL)
+
+#define gnutls_cli_short_usage (gnutls_cli_opt_strs+3296)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&gnutls_cliOptions, GNUTLS_CLI_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the mtu option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0, 17000 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the recordsize option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptRecordsize(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0, 4096 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the x509crlfile option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpkeyfile option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpkeyring option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpcertfile option.
+ *
+ * @param pOptions the gnutls-cli options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with gnutls-cli.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged gnutls-cli
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define gnutls_cli_packager_info NULL
+#else
+static char const gnutls_cli_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport gnutls_cli bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for gnutls-cli.  The one structure that
+ * binds them all.
+ */
+tOptions gnutls_cliOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NEGATIONS
+    + OPTPROC_REORDER
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    38 /* full option count */, 35 /* user option count */,
+    gnutls_cli_full_usage, gnutls_cli_short_usage,
+    NULL, NULL,
+    PKGDATADIR, gnutls_cli_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(GNUTLS_CLI_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the gnutls_cliOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &gnutls_cliOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        gnutls_cliOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* cli-args.c ends here */
diff --git a/src/cli-args.h b/src/cli-args.h
new file mode 100644
index 0000000..39a62b1
--- /dev/null
+++ b/src/cli-args.h
@@ -0,0 +1,255 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (cli-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    cli-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-cli author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-cli program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-cli is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-cli is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the gnutls-cli program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_CLI_ARGS_H_GUARD
+#define AUTOOPTS_CLI_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG                   =  0,
+    INDEX_OPT_VERBOSE                 =  1,
+    INDEX_OPT_TOFU                    =  2,
+    INDEX_OPT_OCSP                    =  3,
+    INDEX_OPT_RESUME                  =  4,
+    INDEX_OPT_REHANDSHAKE             =  5,
+    INDEX_OPT_NOTICKET                =  6,
+    INDEX_OPT_STARTTLS                =  7,
+    INDEX_OPT_UDP                     =  8,
+    INDEX_OPT_MTU                     =  9,
+    INDEX_OPT_CRLF                    = 10,
+    INDEX_OPT_X509FMTDER              = 11,
+    INDEX_OPT_FINGERPRINT             = 12,
+    INDEX_OPT_DISABLE_EXTENSIONS      = 13,
+    INDEX_OPT_PRINT_CERT              = 14,
+    INDEX_OPT_RECORDSIZE              = 15,
+    INDEX_OPT_PRIORITY                = 16,
+    INDEX_OPT_X509CAFILE              = 17,
+    INDEX_OPT_X509CRLFILE             = 18,
+    INDEX_OPT_PGPKEYFILE              = 19,
+    INDEX_OPT_PGPKEYRING              = 20,
+    INDEX_OPT_PGPCERTFILE             = 21,
+    INDEX_OPT_X509KEYFILE             = 22,
+    INDEX_OPT_X509CERTFILE            = 23,
+    INDEX_OPT_PGPSUBKEY               = 24,
+    INDEX_OPT_SRPUSERNAME             = 25,
+    INDEX_OPT_SRPPASSWD               = 26,
+    INDEX_OPT_PSKUSERNAME             = 27,
+    INDEX_OPT_PSKKEY                  = 28,
+    INDEX_OPT_PORT                    = 29,
+    INDEX_OPT_INSECURE                = 30,
+    INDEX_OPT_BENCHMARK_CIPHERS       = 31,
+    INDEX_OPT_BENCHMARK_SOFT_CIPHERS  = 32,
+    INDEX_OPT_BENCHMARK_TLS           = 33,
+    INDEX_OPT_LIST                    = 34,
+    INDEX_OPT_VERSION                 = 35,
+    INDEX_OPT_HELP                    = 36,
+    INDEX_OPT_MORE_HELP               = 37
+} teOptIndex;
+
+#define OPTION_CT    38
+#define GNUTLS_CLI_VERSION       "@VERSION@"
+#define GNUTLS_CLI_FULL_VERSION  "gnutls-cli @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (gnutls_cliOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of gnutls-cli exit codes
+ */
+typedef enum {
+    GNUTLS_CLI_EXIT_SUCCESS = 0,
+    GNUTLS_CLI_EXIT_FAILURE = 1,
+    GNUTLS_CLI_EXIT_LIBOPTS_FAILURE = 70
+} gnutls_cli_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_VERBOSE        'V'
+#define VALUE_OPT_TOFU           2
+#define VALUE_OPT_OCSP           3
+#define VALUE_OPT_RESUME         'r'
+#define VALUE_OPT_REHANDSHAKE    'e'
+#define VALUE_OPT_NOTICKET       6
+#define VALUE_OPT_STARTTLS       's'
+#define VALUE_OPT_UDP            'u'
+#define VALUE_OPT_MTU            9
+
+#define OPT_VALUE_MTU            (DESC(MTU).optArg.argInt)
+#define VALUE_OPT_CRLF           10
+#define VALUE_OPT_X509FMTDER     11
+#define VALUE_OPT_FINGERPRINT    'f'
+#define VALUE_OPT_DISABLE_EXTENSIONS 13
+#define VALUE_OPT_PRINT_CERT     14
+#define VALUE_OPT_RECORDSIZE     15
+
+#define OPT_VALUE_RECORDSIZE     (DESC(RECORDSIZE).optArg.argInt)
+#define VALUE_OPT_PRIORITY       16
+#define VALUE_OPT_X509CAFILE     17
+#define VALUE_OPT_X509CRLFILE    18
+#define VALUE_OPT_PGPKEYFILE     19
+#define VALUE_OPT_PGPKEYRING     20
+#define VALUE_OPT_PGPCERTFILE    21
+#define VALUE_OPT_X509KEYFILE    22
+#define VALUE_OPT_X509CERTFILE   23
+#define VALUE_OPT_PGPSUBKEY      24
+#define VALUE_OPT_SRPUSERNAME    25
+#define VALUE_OPT_SRPPASSWD      26
+#define VALUE_OPT_PSKUSERNAME    27
+#define VALUE_OPT_PSKKEY         28
+#define VALUE_OPT_PORT           'p'
+#define VALUE_OPT_INSECURE       30
+#define VALUE_OPT_BENCHMARK_CIPHERS 31
+#define VALUE_OPT_BENCHMARK_SOFT_CIPHERS 32
+#define VALUE_OPT_BENCHMARK_TLS  129
+#define VALUE_OPT_LIST           'l'
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(gnutls_cliOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(gnutls_cliOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                gnutls_cliOptions.curOptIdx = (n); \
+                gnutls_cliOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*gnutls_cliOptions.pUsageProc)(&gnutls_cliOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the gnutls-cli option descriptor.
+ */
+extern tOptions gnutls_cliOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(gnutls_cliOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(gnutls_cliOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(gnutls_cliOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(gnutls_cliOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_CLI_ARGS_H_GUARD */
+/* cli-args.h ends here */
diff --git a/src/cli-debug-args.c b/src/cli-debug-args.c
new file mode 100644
index 0000000..f0df874
--- /dev/null
+++ b/src/cli-debug-args.c
@@ -0,0 +1,549 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (cli-debug-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    cli-debug-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-cli-debug author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-cli-debug program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-cli-debug is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-cli-debug is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "cli-debug-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (gnutls_cli_debug_opt_strs+0)
+#define zLicenseDescrip (gnutls_cli_debug_opt_strs+287)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  gnutls-cli-debug option static const strings
+ */
+static char const gnutls_cli_debug_opt_strs[1841] =
+/*     0 */ "gnutls-cli-debug @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   287 */ "gnutls-cli-debug is free software: you can redistribute it and/or 
modify it\n"
+            "under the terms of the GNU General Public License as published by 
the Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "gnutls-cli-debug is distributed in the hope that it will be 
useful, but\n"
+            "WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY\n"
+            "or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public 
License\n"
+            "for more details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   908 */ "Enable debugging.\0"
+/*   926 */ "DEBUG\0"
+/*   932 */ "debug\0"
+/*   938 */ "More verbose output\0"
+/*   958 */ "VERBOSE\0"
+/*   966 */ "verbose\0"
+/*   974 */ "The port to connect to\0"
+/*   997 */ "PORT\0"
+/*  1002 */ "port\0"
+/*  1007 */ "Display extended usage information and exit\0"
+/*  1051 */ "help\0"
+/*  1056 */ "Extended usage information passed thru pager\0"
+/*  1101 */ "more-help\0"
+/*  1111 */ "Output version information and exit\0"
+/*  1147 */ "version\0"
+/*  1155 */ "GNUTLS_CLI_DEBUG\0"
+/*  1172 */ "gnutls-cli-debug - GnuTLS debug client - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... \n\0"
+/*  1287 */ "address@hidden"
+/*  1306 */ "\n\n\0"
+/*  1309 */ "\n"
+            "TLS debug client.  It sets up multiple TLS connections to a 
server and\n"
+            "queries its capabilities.  It was created to assist in debugging 
GnuTLS,\n"
+            "but it might be useful to extract a TLS server's capabilities.  
It connects\n"
+            "to a TLS server, performs tests and print the server's 
capabilities.  If\n"
+            "called with the `-v' parameter more checks will be performed.  
Can be used\n"
+            "to check for servers with special needs or bugs.\n\0"
+/*  1728 */ "gnutls-cli-debug @address@hidden"
+/*  1755 */ "Usage: gnutls-cli-debug [options] hostname\n"
+            "gnutls-cli --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (gnutls_cli_debug_opt_strs+908)
+#define DEBUG_NAME      (gnutls_cli_debug_opt_strs+926)
+#define DEBUG_name      (gnutls_cli_debug_opt_strs+932)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  verbose option description:
+ */
+#define VERBOSE_DESC      (gnutls_cli_debug_opt_strs+938)
+#define VERBOSE_NAME      (gnutls_cli_debug_opt_strs+958)
+#define VERBOSE_name      (gnutls_cli_debug_opt_strs+966)
+#define VERBOSE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  port option description:
+ */
+#define PORT_DESC      (gnutls_cli_debug_opt_strs+974)
+#define PORT_NAME      (gnutls_cli_debug_opt_strs+997)
+#define PORT_name      (gnutls_cli_debug_opt_strs+1002)
+#define PORT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (gnutls_cli_debug_opt_strs+1007)
+#define HELP_name       (gnutls_cli_debug_opt_strs+1051)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (gnutls_cli_debug_opt_strs+1056)
+#define MORE_HELP_name  (gnutls_cli_debug_opt_strs+1101)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (gnutls_cli_debug_opt_strs+1111)
+#define VER_name        (gnutls_cli_debug_opt_strs+1147)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug, doOptPort, doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the gnutls-cli-debug Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the gnutls-cli-debug program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equiv idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, NOLIMIT, 0,
+     /* opt state flags  */ VERBOSE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verbose */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_PORT,
+     /* equiv idx, value */ 2, VALUE_OPT_PORT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PORT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --port */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPort,
+     /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the gnutls-cli-debug Option Environment
+ */
+#define zPROGNAME       (gnutls_cli_debug_opt_strs+1155)
+#define zUsageTitle     (gnutls_cli_debug_opt_strs+1172)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (gnutls_cli_debug_opt_strs+1287)
+#define zExplain        (gnutls_cli_debug_opt_strs+1306)
+#define zDetail         (gnutls_cli_debug_opt_strs+1309)
+#define zFullVersion    (gnutls_cli_debug_opt_strs+1728)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define gnutls_cli_debug_full_usage (NULL)
+
+#define gnutls_cli_debug_short_usage (gnutls_cli_debug_opt_strs+1755)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&gnutls_cli_debugOptions, GNUTLS_CLI_DEBUG_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the gnutls-cli-debug options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the port option.
+ *
+ * @param pOptions the gnutls-cli-debug options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPort(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  65536 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with gnutls-cli-debug.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged gnutls-cli-debug
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define gnutls_cli_debug_packager_info NULL
+#else
+static char const gnutls_cli_debug_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport gnutls_cli_debug bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for gnutls-cli-debug.  The one structure that
+ * binds them all.
+ */
+tOptions gnutls_cli_debugOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_ARGS_REQ
+    + OPTPROC_REORDER
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    6 /* full option count */, 3 /* user option count */,
+    gnutls_cli_debug_full_usage, gnutls_cli_debug_short_usage,
+    NULL, NULL,
+    PKGDATADIR, gnutls_cli_debug_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(GNUTLS_CLI_DEBUG_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the gnutls_cli_debugOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &gnutls_cli_debugOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        gnutls_cli_debugOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | 
OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* cli-debug-args.c ends here */
diff --git a/src/cli-debug-args.h b/src/cli-debug-args.h
new file mode 100644
index 0000000..b902acd
--- /dev/null
+++ b/src/cli-debug-args.h
@@ -0,0 +1,189 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (cli-debug-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    cli-debug-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-cli-debug author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-cli-debug program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-cli-debug is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-cli-debug is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the gnutls-cli-debug program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD
+#define AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG       =  0,
+    INDEX_OPT_VERBOSE     =  1,
+    INDEX_OPT_PORT        =  2,
+    INDEX_OPT_VERSION     =  3,
+    INDEX_OPT_HELP        =  4,
+    INDEX_OPT_MORE_HELP   =  5
+} teOptIndex;
+
+#define OPTION_CT    6
+#define GNUTLS_CLI_DEBUG_VERSION       "@VERSION@"
+#define GNUTLS_CLI_DEBUG_FULL_VERSION  "gnutls-cli-debug @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (gnutls_cli_debugOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of gnutls-cli-debug exit codes
+ */
+typedef enum {
+    GNUTLS_CLI_DEBUG_EXIT_SUCCESS = 0,
+    GNUTLS_CLI_DEBUG_EXIT_FAILURE = 1,
+    GNUTLS_CLI_DEBUG_EXIT_LIBOPTS_FAILURE = 70
+} gnutls_cli_debug_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_VERBOSE        'V'
+#define VALUE_OPT_PORT           'p'
+
+#define OPT_VALUE_PORT           (DESC(PORT).optArg.argInt)
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(gnutls_cli_debugOptions.fOptSet &= 
~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(gnutls_cli_debugOptions.fOptSet |= 
OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                gnutls_cli_debugOptions.curOptIdx = (n); \
+                gnutls_cli_debugOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        
(*gnutls_cli_debugOptions.pUsageProc)(&gnutls_cli_debugOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the gnutls-cli-debug option descriptor.
+ */
+extern tOptions gnutls_cli_debugOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(gnutls_cli_debugOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(gnutls_cli_debugOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(gnutls_cli_debugOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(gnutls_cli_debugOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_CLI_DEBUG_ARGS_H_GUARD */
+/* cli-debug-args.h ends here */
diff --git a/src/libopts/Makefile.am b/src/libopts/Makefile.am
index 33977a8..db754db 100644
--- a/src/libopts/Makefile.am
+++ b/src/libopts/Makefile.am
@@ -7,14 +7,14 @@ noinst_LTLIBRARIES      = libopts.la
 endif
 libopts_la_SOURCES      = libopts.c
 libopts_la_CPPFLAGS     = -I$(top_srcdir)
-libopts_la_LDFLAGS      = -version-info  36:3:11
+libopts_la_LDFLAGS      = -version-info  36:4:11
 EXTRA_DIST              = \
     ag-char-map.h           alias.c                 ao-strs.c  \
-    ao-strs.h               autoopts/project.h      autoopts/options.h  \
+    ao-strs.h               autoopts/options.h      autoopts/project.h  \
     autoopts/usage-txt.h    autoopts.c              autoopts.h  \
-    boolean.c               check.c                 compat/pathfind.c  \
-    compat/strchr.c         compat/windows-config.h compat/snprintf.c  \
-    compat/compat.h         compat/strdup.c         configfile.c  \
+    boolean.c               check.c                 compat/strchr.c  \
+    compat/pathfind.c       compat/strdup.c         compat/windows-config.h  \
+    compat/snprintf.c       compat/compat.h         configfile.c  \
     cook.c                  COPYING.gplv3           COPYING.lgplv3  \
     COPYING.mbsd            enum.c                  env.c  \
     file.c                  find.c                  genshell.c  \
diff --git a/src/libopts/ag-char-map.h b/src/libopts/ag-char-map.h
index c06b46a..33d4fe6 100644
--- a/src/libopts/ag-char-map.h
+++ b/src/libopts/ag-char-map.h
@@ -1,5 +1,6 @@
 /*
- *   Character mapping generated 02/26/12 11:08:40
+ *  28 bits for 44 character classifications
+ *  generated by char-mapper on 05/06/12 at 16:20:58
  *
  *  This file contains the character classifications
  *  used by AutoGen and AutoOpts for identifying tokens.
@@ -46,159 +47,399 @@
 // 
 // %guard
 // %file           ag-char-map.h
+// %backup
+// %optimize
 // 
 // %comment -- see above
 // %
 // 
-// lower-case      "a-z"
-// upper-case      "A-Z"
-// alphabetic      +lower-case   +upper-case
+// newline         "\n"
+// nul-byte        "\x00"
+// dir-sep         "/\\"
+// percent         "%"
+// comma           ","
+// colon           ":"
+// underscore      "_"
+// plus            "+"
+// dollar          "$"
+// 
+// horiz-white     "\t "
+// alt-white       "\v\f\r\b"
+// whitespace      +horiz-white  +newline +alt-white
+// non-nl-white    +horiz-white  +alt-white
+// quote           "'\""
+// parentheses     "()"
+// 
+// graphic         "!-~"
+// inversion       "~-"
 // oct-digit       "0-7"
 // dec-digit       "89"          +oct-digit
 // hex-digit       "a-fA-F"      +dec-digit
+// lower-case      "a-z"
+// upper-case      "A-Z"
+// alphabetic      +lower-case   +upper-case
 // alphanumeric    +alphabetic   +dec-digit
-// var-first       "_"           +alphabetic
+// var-first       +underscore   +alphabetic
 // variable-name   +var-first    +dec-digit
 // option-name     "^-"          +variable-name
-// value-name      ":"           +option-name
-// horiz-white     "\t "
+// value-name      +colon        +option-name
 // name-sep        "[.]"
 // compound-name   +value-name   +name-sep +horiz-white
-// whitespace      "\v\f\r\n\b"  +horiz-white
-// unquotable      "!-~"         -"\"#(),;<=>[\\]`{}?*'"
+// scheme-note     +parentheses  +quote
+// 
+// unquotable      "!-~"         -"#,;<=>[\\]`{}?*" -quote -parentheses
 // end-xml-token   "/>"          +whitespace
-// graphic         "!-~"
-// plus-n-space    "+"           +whitespace
+// plus-n-space    +plus         +whitespace
 // punctuation     "!-~"         -alphanumeric -"_"
 // suffix          "-._"         +alphanumeric
-// suffix-fmt      "%/"          +suffix     
-// false-type      "nNfF0\x00"
-// file-name       "/"           +suffix
-// end-token       "\x00"        +whitespace
-// end-list-entry  ","           +end-token
+// suffix-fmt      +percent      +suffix +dir-sep
+// false-type      "nNfF0"       +nul-byte
+// file-name       +dir-sep      +suffix
+// end-token       +nul-byte     +whitespace
+// end-list-entry  +comma        +end-token
 // set-separator   "|+"          +end-list-entry
+// signed-number   +inversion    +dec-digit
+// make-script     +dollar       +newline
 //
 #endif /* 0 -- mapping spec. source */
 
 
 typedef uint32_t ag_char_map_mask_t;
 
-#define  IS_LOWER_CASE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x000001)
-#define SPN_LOWER_CASE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x000001)
-#define BRK_LOWER_CASE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x000001)
-#define  IS_UPPER_CASE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x000002)
-#define SPN_UPPER_CASE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x000002)
-#define BRK_UPPER_CASE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x000002)
-#define  IS_ALPHABETIC_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x000003)
-#define SPN_ALPHABETIC_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x000003)
-#define BRK_ALPHABETIC_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x000003)
-#define  IS_OCT_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x000004)
-#define SPN_OCT_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x000004)
-#define BRK_OCT_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x000004)
-#define  IS_DEC_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x00000C)
-#define SPN_DEC_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x00000C)
-#define BRK_DEC_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x00000C)
-#define  IS_HEX_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x00001C)
-#define SPN_HEX_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x00001C)
-#define BRK_HEX_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x00001C)
-#define  IS_ALPHANUMERIC_CHAR( _c)     is_ag_char_map_char((char)( _c), 
0x00000F)
-#define SPN_ALPHANUMERIC_CHARS(_s)    spn_ag_char_map_chars((char *)_s, 
0x00000F)
-#define BRK_ALPHANUMERIC_CHARS(_s)    brk_ag_char_map_chars((char *)_s, 
0x00000F)
-#define  IS_VAR_FIRST_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x000023)
-#define SPN_VAR_FIRST_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x000023)
-#define BRK_VAR_FIRST_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x000023)
-#define  IS_VARIABLE_NAME_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x00002F)
-#define SPN_VARIABLE_NAME_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 
0x00002F)
-#define BRK_VARIABLE_NAME_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 
0x00002F)
-#define  IS_OPTION_NAME_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x00006F)
-#define SPN_OPTION_NAME_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 
0x00006F)
-#define BRK_OPTION_NAME_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 
0x00006F)
-#define  IS_VALUE_NAME_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0000EF)
-#define SPN_VALUE_NAME_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x0000EF)
-#define BRK_VALUE_NAME_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x0000EF)
-#define  IS_HORIZ_WHITE_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x000100)
-#define SPN_HORIZ_WHITE_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 
0x000100)
-#define BRK_HORIZ_WHITE_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 
0x000100)
-#define  IS_NAME_SEP_CHAR( _c)         is_ag_char_map_char((char)( _c), 
0x000200)
-#define SPN_NAME_SEP_CHARS(_s)        spn_ag_char_map_chars((char *)_s, 
0x000200)
-#define BRK_NAME_SEP_CHARS(_s)        brk_ag_char_map_chars((char *)_s, 
0x000200)
-#define  IS_COMPOUND_NAME_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x0003EF)
-#define SPN_COMPOUND_NAME_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 
0x0003EF)
-#define BRK_COMPOUND_NAME_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 
0x0003EF)
-#define  IS_WHITESPACE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x000500)
-#define SPN_WHITESPACE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x000500)
-#define BRK_WHITESPACE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x000500)
-#define  IS_UNQUOTABLE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x000800)
-#define SPN_UNQUOTABLE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x000800)
-#define BRK_UNQUOTABLE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x000800)
-#define  IS_END_XML_TOKEN_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x001500)
-#define SPN_END_XML_TOKEN_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 
0x001500)
-#define BRK_END_XML_TOKEN_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 
0x001500)
-#define  IS_GRAPHIC_CHAR( _c)          is_ag_char_map_char((char)( _c), 
0x002000)
-#define SPN_GRAPHIC_CHARS(_s)         spn_ag_char_map_chars((char *)_s, 
0x002000)
-#define BRK_GRAPHIC_CHARS(_s)         brk_ag_char_map_chars((char *)_s, 
0x002000)
-#define  IS_PLUS_N_SPACE_CHAR( _c)     is_ag_char_map_char((char)( _c), 
0x004500)
-#define SPN_PLUS_N_SPACE_CHARS(_s)    spn_ag_char_map_chars((char *)_s, 
0x004500)
-#define BRK_PLUS_N_SPACE_CHARS(_s)    brk_ag_char_map_chars((char *)_s, 
0x004500)
-#define  IS_PUNCTUATION_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x008000)
-#define SPN_PUNCTUATION_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 
0x008000)
-#define BRK_PUNCTUATION_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 
0x008000)
-#define  IS_SUFFIX_CHAR( _c)           is_ag_char_map_char((char)( _c), 
0x01000F)
-#define SPN_SUFFIX_CHARS(_s)          spn_ag_char_map_chars((char *)_s, 
0x01000F)
-#define BRK_SUFFIX_CHARS(_s)          brk_ag_char_map_chars((char *)_s, 
0x01000F)
-#define  IS_SUFFIX_FMT_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x03000F)
-#define SPN_SUFFIX_FMT_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x03000F)
-#define BRK_SUFFIX_FMT_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x03000F)
-#define  IS_FALSE_TYPE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x040000)
-#define SPN_FALSE_TYPE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 
0x040000)
-#define BRK_FALSE_TYPE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 
0x040000)
-#define  IS_FILE_NAME_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x09000F)
-#define SPN_FILE_NAME_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x09000F)
-#define BRK_FILE_NAME_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x09000F)
-#define  IS_END_TOKEN_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x100500)
-#define SPN_END_TOKEN_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 
0x100500)
-#define BRK_END_TOKEN_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 
0x100500)
-#define  IS_END_LIST_ENTRY_CHAR( _c)   is_ag_char_map_char((char)( _c), 
0x300500)
-#define SPN_END_LIST_ENTRY_CHARS(_s)  spn_ag_char_map_chars((char *)_s, 
0x300500)
-#define BRK_END_LIST_ENTRY_CHARS(_s)  brk_ag_char_map_chars((char *)_s, 
0x300500)
-#define  IS_SET_SEPARATOR_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x700500)
-#define SPN_SET_SEPARATOR_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 
0x700500)
-#define BRK_SET_SEPARATOR_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 
0x700500)
+#define  IS_NEWLINE_CHAR( _c)          is_ag_char_map_char((char)( _c), 
0x0000001)
+#define SPN_NEWLINE_CHARS(_s)         spn_ag_char_map_chars((char *)_s, 0)
+#define BRK_NEWLINE_CHARS(_s)         brk_ag_char_map_chars((char *)_s, 0)
+#define SPN_NEWLINE_BACK(s,e)         spn_ag_char_map_back((char *)s, (char 
*)e, 0)
+#define BRK_NEWLINE_BACK(s,e)         brk_ag_char_map_back((char *)s, (char 
*)e, 0)
+#define  IS_NUL_BYTE_CHAR( _c)         is_ag_char_map_char((char)( _c), 
0x0000002)
+#define SPN_NUL_BYTE_CHARS(_s)        spn_ag_char_map_chars((char *)_s, 1)
+#define BRK_NUL_BYTE_CHARS(_s)        brk_ag_char_map_chars((char *)_s, 1)
+#define SPN_NUL_BYTE_BACK(s,e)        spn_ag_char_map_back((char *)s, (char 
*)e, 1)
+#define BRK_NUL_BYTE_BACK(s,e)        brk_ag_char_map_back((char *)s, (char 
*)e, 1)
+#define  IS_DIR_SEP_CHAR( _c)          is_ag_char_map_char((char)( _c), 
0x0000004)
+#define SPN_DIR_SEP_CHARS(_s)         spn_ag_char_map_chars((char *)_s, 2)
+#define BRK_DIR_SEP_CHARS(_s)         brk_ag_char_map_chars((char *)_s, 2)
+#define SPN_DIR_SEP_BACK(s,e)         spn_ag_char_map_back((char *)s, (char 
*)e, 2)
+#define BRK_DIR_SEP_BACK(s,e)         brk_ag_char_map_back((char *)s, (char 
*)e, 2)
+#define  IS_PERCENT_CHAR( _c)          is_ag_char_map_char((char)( _c), 
0x0000008)
+#define SPN_PERCENT_CHARS(_s)         spn_ag_char_map_chars((char *)_s, 3)
+#define BRK_PERCENT_CHARS(_s)         brk_ag_char_map_chars((char *)_s, 3)
+#define SPN_PERCENT_BACK(s,e)         spn_ag_char_map_back((char *)s, (char 
*)e, 3)
+#define BRK_PERCENT_BACK(s,e)         brk_ag_char_map_back((char *)s, (char 
*)e, 3)
+#define  IS_COMMA_CHAR( _c)            is_ag_char_map_char((char)( _c), 
0x0000010)
+#define SPN_COMMA_CHARS(_s)           spn_ag_char_map_chars((char *)_s, 4)
+#define BRK_COMMA_CHARS(_s)           brk_ag_char_map_chars((char *)_s, 4)
+#define SPN_COMMA_BACK(s,e)           spn_ag_char_map_back((char *)s, (char 
*)e, 4)
+#define BRK_COMMA_BACK(s,e)           brk_ag_char_map_back((char *)s, (char 
*)e, 4)
+#define  IS_COLON_CHAR( _c)            is_ag_char_map_char((char)( _c), 
0x0000020)
+#define SPN_COLON_CHARS(_s)           spn_ag_char_map_chars((char *)_s, 5)
+#define BRK_COLON_CHARS(_s)           brk_ag_char_map_chars((char *)_s, 5)
+#define SPN_COLON_BACK(s,e)           spn_ag_char_map_back((char *)s, (char 
*)e, 5)
+#define BRK_COLON_BACK(s,e)           brk_ag_char_map_back((char *)s, (char 
*)e, 5)
+#define  IS_UNDERSCORE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0000040)
+#define SPN_UNDERSCORE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 6)
+#define BRK_UNDERSCORE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 6)
+#define SPN_UNDERSCORE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 6)
+#define BRK_UNDERSCORE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 6)
+#define  IS_PLUS_CHAR( _c)             is_ag_char_map_char((char)( _c), 
0x0000080)
+#define SPN_PLUS_CHARS(_s)            spn_ag_char_map_chars((char *)_s, 7)
+#define BRK_PLUS_CHARS(_s)            brk_ag_char_map_chars((char *)_s, 7)
+#define SPN_PLUS_BACK(s,e)            spn_ag_char_map_back((char *)s, (char 
*)e, 7)
+#define BRK_PLUS_BACK(s,e)            brk_ag_char_map_back((char *)s, (char 
*)e, 7)
+#define  IS_DOLLAR_CHAR( _c)           is_ag_char_map_char((char)( _c), 
0x0000100)
+#define SPN_DOLLAR_CHARS(_s)          spn_ag_char_map_chars((char *)_s, 8)
+#define BRK_DOLLAR_CHARS(_s)          brk_ag_char_map_chars((char *)_s, 8)
+#define SPN_DOLLAR_BACK(s,e)          spn_ag_char_map_back((char *)s, (char 
*)e, 8)
+#define BRK_DOLLAR_BACK(s,e)          brk_ag_char_map_back((char *)s, (char 
*)e, 8)
+#define  IS_HORIZ_WHITE_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x0000200)
+#define SPN_HORIZ_WHITE_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 9)
+#define BRK_HORIZ_WHITE_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 9)
+#define SPN_HORIZ_WHITE_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 9)
+#define BRK_HORIZ_WHITE_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 9)
+#define  IS_ALT_WHITE_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0000400)
+#define SPN_ALT_WHITE_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 10)
+#define BRK_ALT_WHITE_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 10)
+#define SPN_ALT_WHITE_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 10)
+#define BRK_ALT_WHITE_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 10)
+#define  IS_WHITESPACE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0000601)
+#define SPN_WHITESPACE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 11)
+#define BRK_WHITESPACE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 11)
+#define SPN_WHITESPACE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 11)
+#define BRK_WHITESPACE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 11)
+#define  IS_NON_NL_WHITE_CHAR( _c)     is_ag_char_map_char((char)( _c), 
0x0000600)
+#define SPN_NON_NL_WHITE_CHARS(_s)    spn_ag_char_map_chars((char *)_s, 12)
+#define BRK_NON_NL_WHITE_CHARS(_s)    brk_ag_char_map_chars((char *)_s, 12)
+#define SPN_NON_NL_WHITE_BACK(s,e)    spn_ag_char_map_back((char *)s, (char 
*)e, 12)
+#define BRK_NON_NL_WHITE_BACK(s,e)    brk_ag_char_map_back((char *)s, (char 
*)e, 12)
+#define  IS_QUOTE_CHAR( _c)            is_ag_char_map_char((char)( _c), 
0x0000800)
+#define SPN_QUOTE_CHARS(_s)           spn_ag_char_map_chars((char *)_s, 13)
+#define BRK_QUOTE_CHARS(_s)           brk_ag_char_map_chars((char *)_s, 13)
+#define SPN_QUOTE_BACK(s,e)           spn_ag_char_map_back((char *)s, (char 
*)e, 13)
+#define BRK_QUOTE_BACK(s,e)           brk_ag_char_map_back((char *)s, (char 
*)e, 13)
+#define  IS_PARENTHESES_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x0001000)
+#define SPN_PARENTHESES_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 14)
+#define BRK_PARENTHESES_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 14)
+#define SPN_PARENTHESES_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 14)
+#define BRK_PARENTHESES_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 14)
+#define  IS_GRAPHIC_CHAR( _c)          is_ag_char_map_char((char)( _c), 
0x0002000)
+#define SPN_GRAPHIC_CHARS(_s)         spn_ag_char_map_chars((char *)_s, 15)
+#define BRK_GRAPHIC_CHARS(_s)         brk_ag_char_map_chars((char *)_s, 15)
+#define SPN_GRAPHIC_BACK(s,e)         spn_ag_char_map_back((char *)s, (char 
*)e, 15)
+#define BRK_GRAPHIC_BACK(s,e)         brk_ag_char_map_back((char *)s, (char 
*)e, 15)
+#define  IS_INVERSION_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0004000)
+#define SPN_INVERSION_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 16)
+#define BRK_INVERSION_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 16)
+#define SPN_INVERSION_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 16)
+#define BRK_INVERSION_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 16)
+#define  IS_OCT_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0008000)
+#define SPN_OCT_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 17)
+#define BRK_OCT_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 17)
+#define SPN_OCT_DIGIT_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 17)
+#define BRK_OCT_DIGIT_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 17)
+#define  IS_DEC_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0018000)
+#define SPN_DEC_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 18)
+#define BRK_DEC_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 18)
+#define SPN_DEC_DIGIT_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 18)
+#define BRK_DEC_DIGIT_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 18)
+#define  IS_HEX_DIGIT_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0038000)
+#define SPN_HEX_DIGIT_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 19)
+#define BRK_HEX_DIGIT_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 19)
+#define SPN_HEX_DIGIT_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 19)
+#define BRK_HEX_DIGIT_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 19)
+#define  IS_LOWER_CASE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0040000)
+#define SPN_LOWER_CASE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 20)
+#define BRK_LOWER_CASE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 20)
+#define SPN_LOWER_CASE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 20)
+#define BRK_LOWER_CASE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 20)
+#define  IS_UPPER_CASE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0080000)
+#define SPN_UPPER_CASE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 21)
+#define BRK_UPPER_CASE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 21)
+#define SPN_UPPER_CASE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 21)
+#define BRK_UPPER_CASE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 21)
+#define  IS_ALPHABETIC_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x00C0000)
+#define SPN_ALPHABETIC_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 22)
+#define BRK_ALPHABETIC_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 22)
+#define SPN_ALPHABETIC_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 22)
+#define BRK_ALPHABETIC_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 22)
+#define  IS_ALPHANUMERIC_CHAR( _c)     is_ag_char_map_char((char)( _c), 
0x00D8000)
+#define SPN_ALPHANUMERIC_CHARS(_s)    spn_ag_char_map_chars((char *)_s, 23)
+#define BRK_ALPHANUMERIC_CHARS(_s)    brk_ag_char_map_chars((char *)_s, 23)
+#define SPN_ALPHANUMERIC_BACK(s,e)    spn_ag_char_map_back((char *)s, (char 
*)e, 23)
+#define BRK_ALPHANUMERIC_BACK(s,e)    brk_ag_char_map_back((char *)s, (char 
*)e, 23)
+#define  IS_VAR_FIRST_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x00C0040)
+#define SPN_VAR_FIRST_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 24)
+#define BRK_VAR_FIRST_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 24)
+#define SPN_VAR_FIRST_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 24)
+#define BRK_VAR_FIRST_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 24)
+#define  IS_VARIABLE_NAME_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x00D8040)
+#define SPN_VARIABLE_NAME_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 25)
+#define BRK_VARIABLE_NAME_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 25)
+#define SPN_VARIABLE_NAME_BACK(s,e)   spn_ag_char_map_back((char *)s, (char 
*)e, 25)
+#define BRK_VARIABLE_NAME_BACK(s,e)   brk_ag_char_map_back((char *)s, (char 
*)e, 25)
+#define  IS_OPTION_NAME_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x01D8040)
+#define SPN_OPTION_NAME_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 26)
+#define BRK_OPTION_NAME_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 26)
+#define SPN_OPTION_NAME_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 26)
+#define BRK_OPTION_NAME_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 26)
+#define  IS_VALUE_NAME_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x01D8060)
+#define SPN_VALUE_NAME_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 27)
+#define BRK_VALUE_NAME_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 27)
+#define SPN_VALUE_NAME_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 27)
+#define BRK_VALUE_NAME_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 27)
+#define  IS_NAME_SEP_CHAR( _c)         is_ag_char_map_char((char)( _c), 
0x0200000)
+#define SPN_NAME_SEP_CHARS(_s)        spn_ag_char_map_chars((char *)_s, 28)
+#define BRK_NAME_SEP_CHARS(_s)        brk_ag_char_map_chars((char *)_s, 28)
+#define SPN_NAME_SEP_BACK(s,e)        spn_ag_char_map_back((char *)s, (char 
*)e, 28)
+#define BRK_NAME_SEP_BACK(s,e)        brk_ag_char_map_back((char *)s, (char 
*)e, 28)
+#define  IS_COMPOUND_NAME_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x03D8260)
+#define SPN_COMPOUND_NAME_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 29)
+#define BRK_COMPOUND_NAME_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 29)
+#define SPN_COMPOUND_NAME_BACK(s,e)   spn_ag_char_map_back((char *)s, (char 
*)e, 29)
+#define BRK_COMPOUND_NAME_BACK(s,e)   brk_ag_char_map_back((char *)s, (char 
*)e, 29)
+#define  IS_SCHEME_NOTE_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x0001800)
+#define SPN_SCHEME_NOTE_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 30)
+#define BRK_SCHEME_NOTE_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 30)
+#define SPN_SCHEME_NOTE_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 30)
+#define BRK_SCHEME_NOTE_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 30)
+#define  IS_UNQUOTABLE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x0400000)
+#define SPN_UNQUOTABLE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 31)
+#define BRK_UNQUOTABLE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 31)
+#define SPN_UNQUOTABLE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 31)
+#define BRK_UNQUOTABLE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 31)
+#define  IS_END_XML_TOKEN_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x0800601)
+#define SPN_END_XML_TOKEN_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 32)
+#define BRK_END_XML_TOKEN_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 32)
+#define SPN_END_XML_TOKEN_BACK(s,e)   spn_ag_char_map_back((char *)s, (char 
*)e, 32)
+#define BRK_END_XML_TOKEN_BACK(s,e)   brk_ag_char_map_back((char *)s, (char 
*)e, 32)
+#define  IS_PLUS_N_SPACE_CHAR( _c)     is_ag_char_map_char((char)( _c), 
0x0000681)
+#define SPN_PLUS_N_SPACE_CHARS(_s)    spn_ag_char_map_chars((char *)_s, 33)
+#define BRK_PLUS_N_SPACE_CHARS(_s)    brk_ag_char_map_chars((char *)_s, 33)
+#define SPN_PLUS_N_SPACE_BACK(s,e)    spn_ag_char_map_back((char *)s, (char 
*)e, 33)
+#define BRK_PLUS_N_SPACE_BACK(s,e)    brk_ag_char_map_back((char *)s, (char 
*)e, 33)
+#define  IS_PUNCTUATION_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x1000000)
+#define SPN_PUNCTUATION_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 34)
+#define BRK_PUNCTUATION_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 34)
+#define SPN_PUNCTUATION_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 34)
+#define BRK_PUNCTUATION_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 34)
+#define  IS_SUFFIX_CHAR( _c)           is_ag_char_map_char((char)( _c), 
0x20D8000)
+#define SPN_SUFFIX_CHARS(_s)          spn_ag_char_map_chars((char *)_s, 35)
+#define BRK_SUFFIX_CHARS(_s)          brk_ag_char_map_chars((char *)_s, 35)
+#define SPN_SUFFIX_BACK(s,e)          spn_ag_char_map_back((char *)s, (char 
*)e, 35)
+#define BRK_SUFFIX_BACK(s,e)          brk_ag_char_map_back((char *)s, (char 
*)e, 35)
+#define  IS_SUFFIX_FMT_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x20D800C)
+#define SPN_SUFFIX_FMT_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 36)
+#define BRK_SUFFIX_FMT_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 36)
+#define SPN_SUFFIX_FMT_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 36)
+#define BRK_SUFFIX_FMT_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 36)
+#define  IS_FALSE_TYPE_CHAR( _c)       is_ag_char_map_char((char)( _c), 
0x4000002)
+#define SPN_FALSE_TYPE_CHARS(_s)      spn_ag_char_map_chars((char *)_s, 37)
+#define BRK_FALSE_TYPE_CHARS(_s)      brk_ag_char_map_chars((char *)_s, 37)
+#define SPN_FALSE_TYPE_BACK(s,e)      spn_ag_char_map_back((char *)s, (char 
*)e, 37)
+#define BRK_FALSE_TYPE_BACK(s,e)      brk_ag_char_map_back((char *)s, (char 
*)e, 37)
+#define  IS_FILE_NAME_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x20D8004)
+#define SPN_FILE_NAME_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 38)
+#define BRK_FILE_NAME_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 38)
+#define SPN_FILE_NAME_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 38)
+#define BRK_FILE_NAME_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 38)
+#define  IS_END_TOKEN_CHAR( _c)        is_ag_char_map_char((char)( _c), 
0x0000603)
+#define SPN_END_TOKEN_CHARS(_s)       spn_ag_char_map_chars((char *)_s, 39)
+#define BRK_END_TOKEN_CHARS(_s)       brk_ag_char_map_chars((char *)_s, 39)
+#define SPN_END_TOKEN_BACK(s,e)       spn_ag_char_map_back((char *)s, (char 
*)e, 39)
+#define BRK_END_TOKEN_BACK(s,e)       brk_ag_char_map_back((char *)s, (char 
*)e, 39)
+#define  IS_END_LIST_ENTRY_CHAR( _c)   is_ag_char_map_char((char)( _c), 
0x0000613)
+#define SPN_END_LIST_ENTRY_CHARS(_s)  spn_ag_char_map_chars((char *)_s, 40)
+#define BRK_END_LIST_ENTRY_CHARS(_s)  brk_ag_char_map_chars((char *)_s, 40)
+#define SPN_END_LIST_ENTRY_BACK(s,e)  spn_ag_char_map_back((char *)s, (char 
*)e, 40)
+#define BRK_END_LIST_ENTRY_BACK(s,e)  brk_ag_char_map_back((char *)s, (char 
*)e, 40)
+#define  IS_SET_SEPARATOR_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x8000613)
+#define SPN_SET_SEPARATOR_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 41)
+#define BRK_SET_SEPARATOR_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 41)
+#define SPN_SET_SEPARATOR_BACK(s,e)   spn_ag_char_map_back((char *)s, (char 
*)e, 41)
+#define BRK_SET_SEPARATOR_BACK(s,e)   brk_ag_char_map_back((char *)s, (char 
*)e, 41)
+#define  IS_SIGNED_NUMBER_CHAR( _c)    is_ag_char_map_char((char)( _c), 
0x001C000)
+#define SPN_SIGNED_NUMBER_CHARS(_s)   spn_ag_char_map_chars((char *)_s, 42)
+#define BRK_SIGNED_NUMBER_CHARS(_s)   brk_ag_char_map_chars((char *)_s, 42)
+#define SPN_SIGNED_NUMBER_BACK(s,e)   spn_ag_char_map_back((char *)s, (char 
*)e, 42)
+#define BRK_SIGNED_NUMBER_BACK(s,e)   brk_ag_char_map_back((char *)s, (char 
*)e, 42)
+#define  IS_MAKE_SCRIPT_CHAR( _c)      is_ag_char_map_char((char)( _c), 
0x0000101)
+#define SPN_MAKE_SCRIPT_CHARS(_s)     spn_ag_char_map_chars((char *)_s, 43)
+#define BRK_MAKE_SCRIPT_CHARS(_s)     brk_ag_char_map_chars((char *)_s, 43)
+#define SPN_MAKE_SCRIPT_BACK(s,e)     spn_ag_char_map_back((char *)s, (char 
*)e, 43)
+#define BRK_MAKE_SCRIPT_BACK(s,e)     brk_ag_char_map_back((char *)s, (char 
*)e, 43)
 
 static ag_char_map_mask_t const ag_char_map_table[128] = {
-  /*NUL*/ 0x140000, /*x01*/ 0x000000, /*x02*/ 0x000000, /*x03*/ 0x000000,
-  /*x04*/ 0x000000, /*x05*/ 0x000000, /*x06*/ 0x000000, /*BEL*/ 0x000000,
-  /* BS*/ 0x000400, /* HT*/ 0x000100, /* NL*/ 0x000400, /* VT*/ 0x000400,
-  /* FF*/ 0x000400, /* CR*/ 0x000400, /*x0E*/ 0x000000, /*x0F*/ 0x000000,
-  /*x10*/ 0x000000, /*x11*/ 0x000000, /*x12*/ 0x000000, /*x13*/ 0x000000,
-  /*x14*/ 0x000000, /*x15*/ 0x000000, /*x16*/ 0x000000, /*x17*/ 0x000000,
-  /*x18*/ 0x000000, /*x19*/ 0x000000, /*x1A*/ 0x000000, /*ESC*/ 0x000000,
-  /*x1C*/ 0x000000, /*x1D*/ 0x000000, /*x1E*/ 0x000000, /*x1F*/ 0x000000,
-  /*   */ 0x000100, /* ! */ 0x00A800, /* " */ 0x00A000, /* # */ 0x00A000,
-  /* $ */ 0x00A800, /* % */ 0x02A800, /* & */ 0x00A800, /* ' */ 0x00A000,
-  /* ( */ 0x00A000, /* ) */ 0x00A000, /* * */ 0x00A000, /* + */ 0x40E800,
-  /* , */ 0x20A000, /* - */ 0x01A840, /* . */ 0x01AA00, /* / */ 0x0AB800,
-  /* 0 */ 0x042804, /* 1 */ 0x002804, /* 2 */ 0x002804, /* 3 */ 0x002804,
-  /* 4 */ 0x002804, /* 5 */ 0x002804, /* 6 */ 0x002804, /* 7 */ 0x002804,
-  /* 8 */ 0x002808, /* 9 */ 0x002808, /* : */ 0x00A880, /* ; */ 0x00A000,
-  /* < */ 0x00A000, /* = */ 0x00A000, /* > */ 0x00B000, /* ? */ 0x00A000,
-  /* @ */ 0x00A800, /* A */ 0x002812, /* B */ 0x002812, /* C */ 0x002812,
-  /* D */ 0x002812, /* E */ 0x002812, /* F */ 0x042812, /* G */ 0x002802,
-  /* H */ 0x002802, /* I */ 0x002802, /* J */ 0x002802, /* K */ 0x002802,
-  /* L */ 0x002802, /* M */ 0x002802, /* N */ 0x042802, /* O */ 0x002802,
-  /* P */ 0x002802, /* Q */ 0x002802, /* R */ 0x002802, /* S */ 0x002802,
-  /* T */ 0x002802, /* U */ 0x002802, /* V */ 0x002802, /* W */ 0x002802,
-  /* X */ 0x002802, /* Y */ 0x002802, /* Z */ 0x002802, /* [ */ 0x00A200,
-  /* \ */ 0x00A000, /* ] */ 0x00A200, /* ^ */ 0x00A840, /* _ */ 0x012820,
-  /* ` */ 0x00A000, /* a */ 0x002811, /* b */ 0x002811, /* c */ 0x002811,
-  /* d */ 0x002811, /* e */ 0x002811, /* f */ 0x042811, /* g */ 0x002801,
-  /* h */ 0x002801, /* i */ 0x002801, /* j */ 0x002801, /* k */ 0x002801,
-  /* l */ 0x002801, /* m */ 0x002801, /* n */ 0x042801, /* o */ 0x002801,
-  /* p */ 0x002801, /* q */ 0x002801, /* r */ 0x002801, /* s */ 0x002801,
-  /* t */ 0x002801, /* u */ 0x002801, /* v */ 0x002801, /* w */ 0x002801,
-  /* x */ 0x002801, /* y */ 0x002801, /* z */ 0x002801, /* { */ 0x00A000,
-  /* | */ 0x40A800, /* } */ 0x00A000, /* ~ */ 0x00A800, /*x7F*/ 0x000000
+  /*NUL*/ 0x0000002, /*x01*/ 0x0000000, /*x02*/ 0x0000000, /*x03*/ 0x0000000,
+  /*x04*/ 0x0000000, /*x05*/ 0x0000000, /*x06*/ 0x0000000, /*BEL*/ 0x0000000,
+  /* BS*/ 0x0000400, /* HT*/ 0x0000200, /* NL*/ 0x0000001, /* VT*/ 0x0000400,
+  /* FF*/ 0x0000400, /* CR*/ 0x0000400, /*x0E*/ 0x0000000, /*x0F*/ 0x0000000,
+  /*x10*/ 0x0000000, /*x11*/ 0x0000000, /*x12*/ 0x0000000, /*x13*/ 0x0000000,
+  /*x14*/ 0x0000000, /*x15*/ 0x0000000, /*x16*/ 0x0000000, /*x17*/ 0x0000000,
+  /*x18*/ 0x0000000, /*x19*/ 0x0000000, /*x1A*/ 0x0000000, /*ESC*/ 0x0000000,
+  /*x1C*/ 0x0000000, /*x1D*/ 0x0000000, /*x1E*/ 0x0000000, /*x1F*/ 0x0000000,
+  /*   */ 0x0000200, /* ! */ 0x1402000, /* " */ 0x1002800, /* # */ 0x1002000,
+  /* $ */ 0x1402100, /* % */ 0x1402008, /* & */ 0x1402000, /* ' */ 0x1002800,
+  /* ( */ 0x1003000, /* ) */ 0x1003000, /* * */ 0x1002000, /* + */ 0x9402080,
+  /* , */ 0x1002010, /* - */ 0x3506000, /* . */ 0x3602000, /* / */ 0x1C02004,
+  /* 0 */ 0x440A000, /* 1 */ 0x040A000, /* 2 */ 0x040A000, /* 3 */ 0x040A000,
+  /* 4 */ 0x040A000, /* 5 */ 0x040A000, /* 6 */ 0x040A000, /* 7 */ 0x040A000,
+  /* 8 */ 0x0412000, /* 9 */ 0x0412000, /* : */ 0x1402020, /* ; */ 0x1002000,
+  /* < */ 0x1002000, /* = */ 0x1002000, /* > */ 0x1802000, /* ? */ 0x1002000,
+  /* @ */ 0x1402000, /* A */ 0x04A2000, /* B */ 0x04A2000, /* C */ 0x04A2000,
+  /* D */ 0x04A2000, /* E */ 0x04A2000, /* F */ 0x44A2000, /* G */ 0x0482000,
+  /* H */ 0x0482000, /* I */ 0x0482000, /* J */ 0x0482000, /* K */ 0x0482000,
+  /* L */ 0x0482000, /* M */ 0x0482000, /* N */ 0x4482000, /* O */ 0x0482000,
+  /* P */ 0x0482000, /* Q */ 0x0482000, /* R */ 0x0482000, /* S */ 0x0482000,
+  /* T */ 0x0482000, /* U */ 0x0482000, /* V */ 0x0482000, /* W */ 0x0482000,
+  /* X */ 0x0482000, /* Y */ 0x0482000, /* Z */ 0x0482000, /* [ */ 0x1202000,
+  /* \ */ 0x1002004, /* ] */ 0x1202000, /* ^ */ 0x1502000, /* _ */ 0x2402040,
+  /* ` */ 0x1002000, /* a */ 0x0462000, /* b */ 0x0462000, /* c */ 0x0462000,
+  /* d */ 0x0462000, /* e */ 0x0462000, /* f */ 0x4462000, /* g */ 0x0442000,
+  /* h */ 0x0442000, /* i */ 0x0442000, /* j */ 0x0442000, /* k */ 0x0442000,
+  /* l */ 0x0442000, /* m */ 0x0442000, /* n */ 0x4442000, /* o */ 0x0442000,
+  /* p */ 0x0442000, /* q */ 0x0442000, /* r */ 0x0442000, /* s */ 0x0442000,
+  /* t */ 0x0442000, /* u */ 0x0442000, /* v */ 0x0442000, /* w */ 0x0442000,
+  /* x */ 0x0442000, /* y */ 0x0442000, /* z */ 0x0442000, /* { */ 0x1002000,
+  /* | */ 0x9402000, /* } */ 0x1002000, /* ~ */ 0x1406000, /*x7F*/ 0x0000000
+};
+
+#include <stdlib.h>
+#include <string.h>
+
+static unsigned char const * ag_char_map_spanners[44];
+/**
+ *  Character category masks.  Some categories may have multiple bits,
+ *  if their definition incorporates other character categories.
+ *  This mask array is only used by calc_ag_char_map_spanners().
+ */
+static ag_char_map_mask_t const ag_char_map_masks[44] = {
+    0x0000001, /* NEWLINE         */
+    0x0000002, /* NUL_BYTE        */
+    0x0000004, /* DIR_SEP         */
+    0x0000008, /* PERCENT         */
+    0x0000010, /* COMMA           */
+    0x0000020, /* COLON           */
+    0x0000040, /* UNDERSCORE      */
+    0x0000080, /* PLUS            */
+    0x0000100, /* DOLLAR          */
+    0x0000200, /* HORIZ_WHITE     */
+    0x0000400, /* ALT_WHITE       */
+    0x0000601, /* WHITESPACE      */
+    0x0000600, /* NON_NL_WHITE    */
+    0x0000800, /* QUOTE           */
+    0x0001000, /* PARENTHESES     */
+    0x0002000, /* GRAPHIC         */
+    0x0004000, /* INVERSION       */
+    0x0008000, /* OCT_DIGIT       */
+    0x0018000, /* DEC_DIGIT       */
+    0x0038000, /* HEX_DIGIT       */
+    0x0040000, /* LOWER_CASE      */
+    0x0080000, /* UPPER_CASE      */
+    0x00C0000, /* ALPHABETIC      */
+    0x00D8000, /* ALPHANUMERIC    */
+    0x00C0040, /* VAR_FIRST       */
+    0x00D8040, /* VARIABLE_NAME   */
+    0x01D8040, /* OPTION_NAME     */
+    0x01D8060, /* VALUE_NAME      */
+    0x0200000, /* NAME_SEP        */
+    0x03D8260, /* COMPOUND_NAME   */
+    0x0001800, /* SCHEME_NOTE     */
+    0x0400000, /* UNQUOTABLE      */
+    0x0800601, /* END_XML_TOKEN   */
+    0x0000681, /* PLUS_N_SPACE    */
+    0x1000000, /* PUNCTUATION     */
+    0x20D8000, /* SUFFIX          */
+    0x20D800C, /* SUFFIX_FMT      */
+    0x4000002, /* FALSE_TYPE      */
+    0x20D8004, /* FILE_NAME       */
+    0x0000603, /* END_TOKEN       */
+    0x0000613, /* END_LIST_ENTRY  */
+    0x8000613, /* SET_SEPARATOR   */
+    0x001C000, /* SIGNED_NUMBER   */
+    0x0000101, /* MAKE_SCRIPT     */
 };
+
+#define lock_ag_char_map_spanners()
+#define unlock_ag_char_map_spanners()
+
+static unsigned char const *
+calc_ag_char_map_spanners(unsigned int mask_ix)
+{
+    lock_ag_char_map_spanners();
+    if (ag_char_map_spanners[mask_ix] == NULL) {
+        int ix = 1;
+        ag_char_map_mask_t mask = ag_char_map_masks[mask_ix];
+        unsigned char * res = malloc(256 /* 1 << NBBY */);
+        memset(res, 0, 256);
+        for (; ix < 128; ix++)
+            if (ag_char_map_table[ix] & mask)
+                res[ix] = 1;
+        ag_char_map_spanners[mask_ix] = res;
+    }
+    unlock_ag_char_map_spanners();
+    return ag_char_map_spanners[mask_ix];
+}
+#define ag_char_map_masks POISONED_ag_char_map_masks
+
 static inline int
 is_ag_char_map_char(char ch, ag_char_map_mask_t mask)
 {
@@ -207,16 +448,44 @@ is_ag_char_map_char(char ch, ag_char_map_mask_t mask)
 }
 
 static inline char *
-spn_ag_char_map_chars(char * p, ag_char_map_mask_t mask)
+spn_ag_char_map_chars(char * p, unsigned int mask_ix)
 {
-    while ((*p != '\0') && is_ag_char_map_char(*p, mask))  p++;
+    unsigned char const * v = ag_char_map_spanners[mask_ix];
+    if (v == NULL)
+        v = calc_ag_char_map_spanners(mask_ix);
+    while (v[(unsigned)*p])  p++;
     return p;
 }
 
 static inline char *
-brk_ag_char_map_chars(char * p, ag_char_map_mask_t mask)
+brk_ag_char_map_chars(char * p, unsigned int mask_ix)
 {
-    while ((*p != '\0') && (! is_ag_char_map_char(*p, mask)))  p++;
+    unsigned char const * v = ag_char_map_spanners[mask_ix];
+    if (v == NULL)
+        v = calc_ag_char_map_spanners(mask_ix);
+    while ((*p != '\0') && (! v[(unsigned)*p]))  p++;
     return p;
 }
+
+static inline char *
+spn_ag_char_map_back(char * s, char * e, unsigned int mask_ix)
+{
+    unsigned char const * v = ag_char_map_spanners[mask_ix];
+    if (v == NULL)
+        v = calc_ag_char_map_spanners(mask_ix);
+    if (s >= e) e = s + strlen(s);
+    while ((e > s) && v[(unsigned)e[-1]])  e--;
+    return e;
+}
+
+static inline char *
+brk_ag_char_map_back(char * s, char * e, unsigned int mask_ix)
+{
+    unsigned char const * v = ag_char_map_spanners[mask_ix];
+    if (v == NULL)
+        v = calc_ag_char_map_spanners(mask_ix);
+    if (s == e) e += strlen(e);
+    while ((e > s) && (! v[(unsigned)e[-1]]))  e--;
+    return e;
+}
 #endif /* AG_CHAR_MAP_H_GUARD */
diff --git a/src/libopts/ao-strs.c b/src/libopts/ao-strs.c
index d0f4d1c..30bcbe5 100644
--- a/src/libopts/ao-strs.c
+++ b/src/libopts/ao-strs.c
@@ -2,7 +2,7 @@
  * 
  * DO NOT EDIT THIS FILE   (ao-strs.c)
  * 
- * It has been AutoGen-ed  February 26, 2012 at 11:08:40 AM by AutoGen 
5.15pre14
+ * It has been AutoGen-ed  May  6, 2012 at 04:20:58 PM by AutoGen 5.16pre36
  * From the definitions    ao-strs.def
  * and the template file   strings
  *
diff --git a/src/libopts/ao-strs.h b/src/libopts/ao-strs.h
index f14cc25..30bbc3b 100644
--- a/src/libopts/ao-strs.h
+++ b/src/libopts/ao-strs.h
@@ -2,7 +2,7 @@
  * 
  * DO NOT EDIT THIS FILE   (ao-strs.h)
  * 
- * It has been AutoGen-ed  February 26, 2012 at 11:08:40 AM by AutoGen 
5.15pre14
+ * It has been AutoGen-ed  May  6, 2012 at 04:20:58 PM by AutoGen 5.16pre36
  * From the definitions    ao-strs.def
  * and the template file   strings
  *
diff --git a/src/libopts/autoopts.c b/src/libopts/autoopts.c
index df9e3cb..1eff700 100644
--- a/src/libopts/autoopts.c
+++ b/src/libopts/autoopts.c
@@ -2,7 +2,7 @@
 /**
  * \file autoopts.c
  *
- *  Time-stamp:      "2012-01-29 09:58:30 bkorb"
+ *  Time-stamp:      "2012-03-04 19:44:56 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -37,7 +37,7 @@
 static char const   zNil[] = "";
 static arg_types_t  argTypes             = { NULL };
 static char         line_fmt_buf[32];
-static ag_bool      displayEnum          = AG_FALSE;
+static bool         displayEnum          = false;
 static char const   pkgdatadir_default[] = PKGDATADIR;
 static char const * program_pkgdatadir   = pkgdatadir_default;
 static tOptionLoadMode option_load_mode  = OPTION_LOAD_UNCOOKED;
@@ -50,7 +50,7 @@ static tSuccess
 next_opt_arg_must(tOptions * pOpts, tOptState* pOptState);
 
 static tSuccess
-next_opt_arg_may(tOptions * pOpts, tOptState* pOptState);
+next_opt_arg_may(tOptions * pOpts, tOptState * pOptState);
 
 static tSuccess
 next_opt_arg_none(tOptions * pOpts, tOptState* pOptState);
@@ -295,9 +295,18 @@ next_opt_arg_must(tOptions * pOpts, tOptState* pOptState)
     return SUCCESS;
 }
 
-
+/**
+ * Process an optional option argument.  For short options, it looks at the
+ * character after the option character, or it consumes the next full argument.
+ * For long options, it looks for an '=' character attachment to the long
+ * option name before deciding to take the next command line argument.
+ *
+ * @param pOpts      the option descriptor
+ * @param pOptState  a structure for managing the current processing state
+ * @returns SUCCESS or does not return
+ */
 static tSuccess
-next_opt_arg_may(tOptions * pOpts, tOptState* pOptState)
+next_opt_arg_may(tOptions * pOpts, tOptState * pOptState)
 {
     /*
      *  An option argument is optional.
diff --git a/src/libopts/autoopts.h b/src/libopts/autoopts.h
index 6c3fee7..194ea5a 100644
--- a/src/libopts/autoopts.h
+++ b/src/libopts/autoopts.h
@@ -2,7 +2,7 @@
 /*
  *  \file autoopts.h
  *
- *  Time-stamp:      "2012-02-12 09:04:40 bkorb"
+ *  Time-stamp:      "2012-03-04 19:05:01 bkorb"
  *
  *  This file defines all the global structures and special values
  *  used in the automated option processing library.
@@ -31,9 +31,6 @@
 #ifndef AUTOGEN_AUTOOPTS_H
 #define AUTOGEN_AUTOOPTS_H
 
-#include "compat/compat.h"
-#include "ag-char-map.h"
-
 #define AO_NAME_LIMIT           127
 #define AO_NAME_SIZE            ((size_t)(AO_NAME_LIMIT + 1))
 
@@ -59,15 +56,19 @@
 # define DIRCH                  '/'
 #endif
 
+#define AO_EXIT_REQ_USAGE       64
 #ifndef EX_NOINPUT
+   /**
+    *  option state was requested from a file that cannot be loaded.
+    */
 #  define EX_NOINPUT            66
 #endif
 #ifndef EX_SOFTWARE
+   /**
+    *  AutoOpts Software failure.
+    */
 #  define EX_SOFTWARE           70
 #endif
-#ifndef EX_CONFIG
-#  define EX_CONFIG             78
-#endif
 
 #define NL '\n'
 
@@ -199,8 +200,6 @@ ao_realloc(void *p, size_t sz);
 static char *
 ao_strdup(char const *str);
 
-#define TAGMEM(m, t)
-
 /*
  *  DO option handling?
  *
diff --git a/src/libopts/autoopts/options.h b/src/libopts/autoopts/options.h
index 35d9aa7..356e7e9 100644
--- a/src/libopts/autoopts/options.h
+++ b/src/libopts/autoopts/options.h
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (options.h)
  *  
- *  It has been AutoGen-ed  February 26, 2012 at 11:08:44 AM by AutoGen 
5.15pre14
+ *  It has been AutoGen-ed  May  6, 2012 at 04:21:03 PM by AutoGen 5.16pre36
  *  From the definitions    funcs.def
  *  and the template file   options_h
  *
@@ -29,25 +29,46 @@
 #include <sys/types.h>
 #include <stdio.h>
 
-#if defined(HAVE_STDINT_H)
-# include <stdint.h>
-#elif defined(HAVE_INTTYPES_H)
-# include <inttypes.h>
-#endif /* HAVE_STDINT/INTTYPES_H */
-
-#if defined(HAVE_LIMITS_H)
-# include <limits.h>
-#elif defined(HAVE_SYS_LIMITS_H)
-# include <sys/limits.h>
-#endif /* HAVE_LIMITS/SYS_LIMITS_H */
-
-#if defined(HAVE_SYSEXITS_H)
-#  include <sysexits.h>
-#endif /* HAVE_SYSEXITS_H */
+#ifndef COMPAT_H_GUARD
+/*
+ * This is needed for test compilations where the "compat.h"
+ * header is not usually available.
+ */
+#  if defined(HAVE_STDINT_H)
+#    include <stdint.h>
+#  elif defined(HAVE_INTTYPES_H)
+#    include <inttypes.h>
+#  endif /* HAVE_STDINT/INTTYPES_H */
+
+#  if defined(HAVE_LIMITS_H)
+#    include <limits.h>
+#  elif defined(HAVE_SYS_LIMITS_H)
+#    include <sys/limits.h>
+#  endif /* HAVE_LIMITS/SYS_LIMITS_H */
+
+#  if defined(HAVE_SYSEXITS_H)
+#    include <sysexits.h>
+#  endif /* HAVE_SYSEXITS_H */
+
+#  if defined(HAVE_STDBOOL_H)
+#    include <stdbool.h>
+#  else
+     typedef enum { false = 0, true = 1 } _Bool;
+#    define bool _Bool
+
+     /* The other macros must be usable in preprocessor directives.  */
+#    define false 0
+#    define true 1
+#  endif /* HAVE_SYSEXITS_H */
+#endif /* COMPAT_H_GUARD */
 // END-CONFIGURED-HEADERS
-#ifndef  EX_USAGE
-# define EX_USAGE               64
-#endif
+
+/**
+ * Defined to normal value of EX_USAGE.  Used to indicate that paged usage
+ * was requested.  It is used to distinguish a --usage from a --help request.
+ * --usage is abbreviated and --help gives as much help as possible.
+ */
+#define AO_EXIT_REQ_USAGE 64
 
 /*
  *  PUBLIC DEFINES
@@ -65,8 +86,8 @@
  *  See the relevant generated header file to determine which and what
  *  values for "opt_name" are available.
  */
-#define OPTIONS_STRUCT_VERSION      147459
-#define OPTIONS_VERSION_STRING      "36:3:11"
+#define OPTIONS_STRUCT_VERSION      147460
+#define OPTIONS_VERSION_STRING      "36:4:11"
 #define OPTIONS_MINIMUM_VERSION     102400
 #define OPTIONS_MIN_VER_STRING      "25:0:0"
 #define OPTIONS_VER_TO_NUM(_v, _r)  (((_v) * 4096) + (_r))
@@ -302,7 +323,7 @@ typedef enum {
         OPTPROC_NXLAT_OPT |     OPTPROC_NXLAT_OPT_CFG \
         /* 0x00030000U */ )
 
-#define STMTS(s)  do { s; } while (0)
+#define STMTS(s)  do { s; } while (false)
 
 /*
  *  The following must be #defined instead of typedef-ed
@@ -534,7 +555,7 @@ CPLUSPLUS_OPENER
  *  The following routines may be coded into AutoOpts client code:
  */
 
-/* From: tokenize.c line 166
+/* From: tokenize.c line 164
  *
  * ao_string_tokenize - tokenize an input string
  *
@@ -598,7 +619,7 @@ extern token_list_t* ao_string_tokenize(char const*);
 extern const tOptionValue* configFileLoad(char const*);
 
 
-/* From: configfile.c line 1059
+/* From: configfile.c line 1066
  *
  * optionFileLoad - Load the locatable config files, in order
  *
@@ -697,7 +718,7 @@ extern void optionFree(tOptions*);
 extern const tOptionValue* optionGetValue(const tOptionValue*, char const*);
 
 
-/* From: load.c line 476
+/* From: load.c line 475
  *
  * optionLoadLine - process a string for an option name and value
  *
@@ -740,7 +761,7 @@ extern void optionLoadLine(tOptions*, char const*);
 extern const tOptionValue* optionNextValue(const tOptionValue*, const 
tOptionValue*);
 
 
-/* From: usage.c line 202
+/* From: usage.c line 201
  *
  * optionOnlyUsage - Print usage text for just the options
  *
@@ -755,7 +776,7 @@ extern const tOptionValue* optionNextValue(const 
tOptionValue*, const tOptionVal
 extern void optionOnlyUsage(tOptions*, int);
 
 
-/* From: autoopts.c line 598
+/* From: autoopts.c line 607
  *
  * optionProcess - this is the main option processing routine
  *
@@ -849,7 +870,7 @@ extern void optionSaveFile(tOptions*);
 extern void optionSaveState(tOptions*);
 
 
-/* From: nested.c line 562
+/* From: nested.c line 563
  *
  * optionUnloadNested - Deallocate the memory for a nested value
  *
@@ -1028,6 +1049,8 @@ extern unsigned int ao_string_cook_escape_char(char 
const*, char*, unsigned int)
 
 extern void genshelloptUsage(tOptions*, int);
 
+extern int optionAlias(tOptions*, tOptDesc*, unsigned int);
+
 extern void optionBooleanVal(tOptions*, tOptDesc*);
 
 extern uintptr_t optionEnumerationVal(tOptions*, tOptDesc*, char const * const 
*, unsigned int);
@@ -1038,7 +1061,7 @@ extern char const * optionKeywordName(tOptDesc*, unsigned 
int);
 
 extern void optionLoadOpt(tOptions*, tOptDesc*);
 
-extern ag_bool optionMakePath(char*, int, char const*, char const*);
+extern bool optionMakePath(char*, int, char const*, char const*);
 
 extern void optionNestedVal(tOptions*, tOptDesc*);
 
diff --git a/src/libopts/autoopts/project.h b/src/libopts/autoopts/project.h
index b01affb..c0df391 100644
--- a/src/libopts/autoopts/project.h
+++ b/src/libopts/autoopts/project.h
@@ -3,6 +3,8 @@
 #define AUTOGEN_PROJECT_H
 
 #include "config.h"
+#include "compat/compat.h"
+#include "ag-char-map.h"
 
 /*
  *  Procedure success codes
@@ -37,8 +39,6 @@ typedef int tSuccess;
 #  define STR(s)        __STR(s)
 #endif
 
-#define STRSIZE(s)      (sizeof(s)-1)
-
 #ifdef DEFINING
 #  define VALUE(s)      = s
 #  define MODE
diff --git a/src/libopts/autoopts/usage-txt.h b/src/libopts/autoopts/usage-txt.h
index 7f9999a..3ed7f3b 100644
--- a/src/libopts/autoopts/usage-txt.h
+++ b/src/libopts/autoopts/usage-txt.h
@@ -2,12 +2,12 @@
  *  
  *  DO NOT EDIT THIS FILE   (usage-txt.h)
  *  
- *  It has been AutoGen-ed  February 26, 2012 at 11:08:42 AM by AutoGen 
5.15pre14
+ *  It has been AutoGen-ed  May  6, 2012 at 04:21:00 PM by AutoGen 5.16pre36
  *  From the definitions    usage-txt.def
  *  and the template file   usage-txt.tpl
  *
  *  This file handles all the bookkeeping required for tracking all the little
- *  tiny strings used by the AutoOpts library.  There are 144
+ *  tiny strings used by the AutoOpts library.  There are 145
  *  of them.  This is not versioned because it is entirely internal to the
  *  library and accessed by client code only in a very well-controlled way:
  *  they may substitute translated strings using a procedure that steps through
@@ -50,7 +50,7 @@ typedef struct {
   char*     utpz_GnuTimeArg;
   char*     utpz_GnuNumArg;
   char*     utpz_GnuStrArg;
-  cch_t*    apz_str[ 137 ];
+  cch_t*    apz_str[ 138 ];
 } usage_text_t;
 
 /*
@@ -202,11 +202,12 @@ extern usage_text_t option_usage_text;
 #define zTabHypAnd            (option_usage_text.apz_str[129])
 #define zTabout               (option_usage_text.apz_str[130])
 #define zThreeSpaces          (option_usage_text.apz_str[131])
-#define zTwoSpaces            (option_usage_text.apz_str[132])
-#define zUpTo                 (option_usage_text.apz_str[133])
-#define zValidKeys            (option_usage_text.apz_str[134])
-#define zVendOptsAre          (option_usage_text.apz_str[135])
-#define zVendIntro            (option_usage_text.apz_str[136])
+#define zTooLarge             (option_usage_text.apz_str[132])
+#define zTwoSpaces            (option_usage_text.apz_str[133])
+#define zUpTo                 (option_usage_text.apz_str[134])
+#define zValidKeys            (option_usage_text.apz_str[135])
+#define zVendOptsAre          (option_usage_text.apz_str[136])
+#define zVendIntro            (option_usage_text.apz_str[137])
 
   /*
    *  First, set up the strings.  Some of these are writable.  These are all in
@@ -221,7 +222,7 @@ extern usage_text_t option_usage_text;
   static char    eng_zGnuTimeArg[] = "=Tim";
   static char    eng_zGnuNumArg[] = "=num";
   static char    eng_zGnuStrArg[] = "=str";
-static char const usage_txt[4575] =
+static char const usage_txt[4631] =
 /*     0 */ "malloc of %d bytes failed\n\0"
 /*    27 */ "AutoOpts function called without option descriptor\n\0"
 /*    79 */ "\tThis exceeds the compiled library version:  \0"
@@ -242,141 +243,142 @@ static char const usage_txt[4575] =
 /*   707 */ "  %s%s\n\0"
 /*   715 */ "%s: Command line arguments required\n\0"
 /*   752 */ "%d %s%s options allowed\n\0"
-/*   777 */ "version and help options:\0"
-/*   803 */ "Error %d (%s) from the pipe(2) syscall\n\0"
-/*   843 */ "ERROR: version option argument '%c' invalid.  Use:\n"
+/*   777 */ "version, usage and configuration options:\0"
+/*   819 */ "Error %d (%s) from the pipe(2) syscall\n\0"
+/*   859 */ "ERROR: version option argument '%c' invalid.  Use:\n"
             "\t'v' - version only\n"
             "\t'c' - version and copyright\n"
             "\t'n' - version and copyright notice\n\0"
-/*   980 */ "ERROR:  %s option conflicts with the %s option\n\0"
-/*  1028 */ "%s(optionSaveState): error: cannot allocate %d bytes\n\0"
-/*  1082 */ "auto-options\0"
-/*  1095 */ "program\0"
-/*  1103 */ "\t\t\t\t- default option for unnamed options\n\0"
-/*  1145 */ "\t\t\t\t- disabled as --%s\n\0"
-/*  1169 */ "%s: The ``%s'' option has been disabled\0"
-/*  1209 */ " --- %-14s %s\n\0"
-/*  1224 */ "This option has been disabled\0"
-/*  1254 */ "\t\t\t\t- enabled by default\n\0"
-/*  1280 */ "-equivalence\0"
-/*  1293 */ "ERROR:  only \0"
-/*  1307 */ " - examining environment variables named %s_*\n\0"
-/*  1354 */ "     \0"
-/*  1360 */ "Options are specified by doubled hyphens and their name or by a 
single\n"
+/*   996 */ "ERROR:  %s option conflicts with the %s option\n\0"
+/*  1044 */ "%s(optionSaveState): error: cannot allocate %d bytes\n\0"
+/*  1098 */ "auto-options\0"
+/*  1111 */ "program\0"
+/*  1119 */ "\t\t\t\t- default option for unnamed options\n\0"
+/*  1161 */ "\t\t\t\t- disabled as --%s\n\0"
+/*  1185 */ "%s: The ``%s'' option has been disabled\0"
+/*  1225 */ " --- %-14s %s\n\0"
+/*  1240 */ "This option has been disabled\0"
+/*  1270 */ "\t\t\t\t- enabled by default\n\0"
+/*  1296 */ "-equivalence\0"
+/*  1309 */ "ERROR:  only \0"
+/*  1323 */ " - examining environment variables named %s_*\n\0"
+/*  1370 */ "     \0"
+/*  1376 */ "Options are specified by doubled hyphens and their name or by a 
single\n"
             "hyphen and the flag character.\n\0"
-/*  1463 */ "%%-%ds %%s\n\0"
-/*  1475 */ "fs error %d (%s) on fork - cannot obtain %s usage\n\0"
-/*  1526 */ "fs error %d (%s) on freopen\n\0"
-/*  1555 */ "File error %d (%s) opening %s for loading options\n\0"
-/*  1606 */ "fs error %d (%s) reading file %s\n\0"
-/*  1640 */ "fs error %d (%s) on %s %s for option %s\n\0"
-/*  1681 */ "stat-ing for directory\0"
-/*  1704 */ "stat-ing for regular file\0"
-/*  1730 */ "stat-ing for non-existant file\0"
-/*  1761 */ "open-ing file\0"
-/*  1775 */ "fopen-ing file\0"
-/*  1790 */ "\t\t\t\t- file must not pre-exist\n\0"
-/*  1821 */ "\t\t\t\t- file must pre-exist\n\0"
-/*  1848 */ "\n"
+/*  1479 */ "%%-%ds %%s\n\0"
+/*  1491 */ "fs error %d (%s) on fork - cannot obtain %s usage\n\0"
+/*  1542 */ "fs error %d (%s) on freopen\n\0"
+/*  1571 */ "File error %d (%s) opening %s for loading options\n\0"
+/*  1622 */ "fs error %d (%s) reading file %s\n\0"
+/*  1656 */ "fs error %d (%s) on %s %s for option %s\n\0"
+/*  1697 */ "stat-ing for directory\0"
+/*  1720 */ "stat-ing for regular file\0"
+/*  1746 */ "stat-ing for non-existant file\0"
+/*  1777 */ "open-ing file\0"
+/*  1791 */ "fopen-ing file\0"
+/*  1806 */ "\t\t\t\t- file must not pre-exist\n\0"
+/*  1837 */ "\t\t\t\t- file must pre-exist\n\0"
+/*  1864 */ "\n"
             "= = = = = = = =\n\n"
             "This incarnation of genshell will produce\n"
             "a shell script to parse the options for %s:\n\n\0"
-/*  1954 */ "\n"
+/*  1970 */ "\n"
             "%s\n\n\0"
-/*  1960 */ "=Cplx\0"
-/*  1966 */ "[=arg]\0"
-/*  1973 */ "--%2$s%1$s\0"
-/*  1984 */ "%s: illegal option -- %c\n\0"
-/*  2010 */ "%s: illegal option -- %s\n\0"
-/*  2036 */ "%s: unknown vendor extension option -- %s\n\0"
-/*  2079 */ "  or an integer from %d through %d\n\0"
-/*  2115 */ "AutoOpts ERROR:  invalid option descriptor for %s\n\0"
-/*  2166 */ "  or an integer mask with any of the lower %d bits set\n\0"
-/*  2222 */ "\t\t\t\t- is a set membership option\n\0"
-/*  2256 */ "%s: option `%s' requires an argument\n\0"
-/*  2294 */ "Equivalenced option '%s' was equivalenced to both\n"
+/*  1976 */ "=Cplx\0"
+/*  1982 */ "[=arg]\0"
+/*  1989 */ "--%2$s%1$s\0"
+/*  2000 */ "%s: illegal option -- %c\n\0"
+/*  2026 */ "%s: illegal option -- %s\n\0"
+/*  2052 */ "%s: unknown vendor extension option -- %s\n\0"
+/*  2095 */ "  or an integer from %d through %d\n\0"
+/*  2131 */ "AutoOpts ERROR:  invalid option descriptor for %s\n\0"
+/*  2182 */ "  or an integer mask with any of the lower %d bits set\n\0"
+/*  2238 */ "\t\t\t\t- is a set membership option\n\0"
+/*  2272 */ "%s: option `%s' requires an argument\n\0"
+/*  2310 */ "Equivalenced option '%s' was equivalenced to both\n"
             "\t'%s' and '%s'\0"
-/*  2359 */ "\t\t\t\t- must appear between %d and %d times\n\0"
-/*  2402 */ "ERROR:  The %s option is required\n\0"
-/*  2437 */ "%s: option `%s' cannot have an argument\n\0"
-/*  2478 */ "%s: Command line arguments not allowed\n\0"
-/*  2518 */ "error %d (%s) creating %s\n\0"
-/*  2545 */ "Options are specified by single or double hyphens and their 
name.\n\0"
-/*  2612 */ "%s error:  `%s' does not match any %s keywords\n\0"
-/*  2660 */ "\t\t\t\t- may appear multiple times\n\0"
-/*  2693 */ "\t\t\t\t- may not be preset\n\0"
-/*  2718 */ "The 'reset-option' option requires an argument\n\0"
-/*  2766 */ "   Arg Option-Name    Description\n\0"
-/*  2801 */ "  Flg Arg Option-Name    Description\n\0"
-/*  2839 */ "error %d (%s) stat-ing %s\n\0"
-/*  2866 */ "%s(optionRestore): error: no saved option state\n\0"
-/*  2915 */ "none\0"
-/*  2920 */ "'%s' not defined\n\0"
-/*  2938 */ "'%s' is not a command line option\n\0"
-/*  2973 */ "ERROR:  The %s option must appear %d times\n\0"
-/*  3017 */ "error:  cannot load options from non-regular file %s\n\0"
-/*  3071 */ "%s error:  `%s' is not a recognizable number\n\0"
-/*  3117 */ "%s error:  `%s' is not a recognizable date/time\n\0"
-/*  3166 */ "%s error:  `%s' is not a recognizable time duration\n\0"
-/*  3219 */ " %3s %s\0"
-/*  3227 */ "The '-#<number>' option may omit the hash char\n\0"
-/*  3275 */ "one %s%s option allowed\n\0"
-/*  3300 */ "All arguments are named options.\n\0"
-/*  3334 */ "Write failure to output file\0"
-/*  3363 */ " - reading file %s\0"
-/*  3382 */ "\n"
+/*  2375 */ "\t\t\t\t- must appear between %d and %d times\n\0"
+/*  2418 */ "ERROR:  The %s option is required\n\0"
+/*  2453 */ "%s: option `%s' cannot have an argument\n\0"
+/*  2494 */ "%s: Command line arguments not allowed\n\0"
+/*  2534 */ "error %d (%s) creating %s\n\0"
+/*  2561 */ "Options are specified by single or double hyphens and their 
name.\n\0"
+/*  2628 */ "%s error:  `%s' does not match any %s keywords\n\0"
+/*  2676 */ "\t\t\t\t- may appear multiple times\n\0"
+/*  2709 */ "\t\t\t\t- may not be preset\n\0"
+/*  2734 */ "The 'reset-option' option requires an argument\n\0"
+/*  2782 */ "   Arg Option-Name    Description\n\0"
+/*  2817 */ "  Flg Arg Option-Name    Description\n\0"
+/*  2855 */ "error %d (%s) stat-ing %s\n\0"
+/*  2882 */ "%s(optionRestore): error: no saved option state\n\0"
+/*  2931 */ "none\0"
+/*  2936 */ "'%s' not defined\n\0"
+/*  2954 */ "'%s' is not a command line option\n\0"
+/*  2989 */ "ERROR:  The %s option must appear %d times\n\0"
+/*  3033 */ "error:  cannot load options from non-regular file %s\n\0"
+/*  3087 */ "%s error:  `%s' is not a recognizable number\n\0"
+/*  3133 */ "%s error:  `%s' is not a recognizable date/time\n\0"
+/*  3182 */ "%s error:  `%s' is not a recognizable time duration\n\0"
+/*  3235 */ " %3s %s\0"
+/*  3243 */ "The '-#<number>' option may omit the hash char\n\0"
+/*  3291 */ "one %s%s option allowed\n\0"
+/*  3316 */ "All arguments are named options.\n\0"
+/*  3350 */ "Write failure to output file\0"
+/*  3379 */ " - reading file %s\0"
+/*  3398 */ "\n"
             "please send bug reports to:  %s\n\0"
-/*  3416 */ "\t\t\t\t- may NOT appear - preset only\n\0"
-/*  3452 */ "#  preset/initialization file\n"
+/*  3432 */ "\t\t\t\t- may NOT appear - preset only\n\0"
+/*  3468 */ "#  preset/initialization file\n"
             "#  %s#\n\0"
-/*  3490 */ "\n"
+/*  3506 */ "\n"
             "The following option preset mechanisms are supported:\n\0"
-/*  3546 */ "prohibits these options:\n\0"
-/*  3572 */ "Operands and options may be intermixed.  They will be 
reordered.\n\0"
-/*  3638 */ "%s%ld to %ld\0"
-/*  3651 */ "%sgreater than or equal to %ld\0"
-/*  3682 */ "%sIt must lie in one of the ranges:\n\0"
-/*  3719 */ "%sIt must be in the range:\n\0"
-/*  3747 */ ", or\n\0"
-/*  3753 */ "%s error:  %s option value %ld is out of range.\n\0"
-/*  3802 */ "%s%ld exactly\0"
-/*  3816 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
-/*  3862 */ "%sless than or equal to %ld\0"
-/*  3890 */ "The --reset-option has not been configured.\n\0"
-/*  3935 */ "ERROR:  %s option requires the %s option\n\0"
-/*  3977 */ " %3s %-14s %s\0"
-/*  3991 */ "requires these options:\n\0"
-/*  4016 */ "   Arg Option-Name   Req?  Description\n\0"
-/*  4056 */ "  Flg Arg Option-Name   Req?  Description\n\0"
-/*  4099 */ "-_^\0"
-/*  4103 */ "or you may use a numeric representation.  Preceding these with a 
'!' will\n"
+/*  3562 */ "prohibits these options:\n\0"
+/*  3588 */ "Operands and options may be intermixed.  They will be 
reordered.\n\0"
+/*  3654 */ "%s%ld to %ld\0"
+/*  3667 */ "%sgreater than or equal to %ld\0"
+/*  3698 */ "%sIt must lie in one of the ranges:\n\0"
+/*  3735 */ "%sIt must be in the range:\n\0"
+/*  3763 */ ", or\n\0"
+/*  3769 */ "%s error:  %s option value %ld is out of range.\n\0"
+/*  3818 */ "%s%ld exactly\0"
+/*  3832 */ "%sis scalable with a suffix: k/K/m/M/g/G/t/T\n\0"
+/*  3878 */ "%sless than or equal to %ld\0"
+/*  3906 */ "The --reset-option has not been configured.\n\0"
+/*  3951 */ "ERROR:  %s option requires the %s option\n\0"
+/*  3993 */ " %3s %-14s %s\0"
+/*  4007 */ "requires these options:\n\0"
+/*  4032 */ "   Arg Option-Name   Req?  Description\n\0"
+/*  4072 */ "  Flg Arg Option-Name   Req?  Description\n\0"
+/*  4115 */ "-_^\0"
+/*  4119 */ "or you may use a numeric representation.  Preceding these with a 
'!' will\n"
             "clear the bits, specifying 'none' will clear all bits, and 'all' 
will set them\n"
             "all.  Multiple entries may be passed as an option argument 
list.\n\0"
-/*  4322 */ "%s\0"
-/*  4325 */ "      \0"
-/*  4332 */ "T/F\0"
-/*  4336 */ "\n"
+/*  4338 */ "%s\0"
+/*  4341 */ "      \0"
+/*  4348 */ "T/F\0"
+/*  4352 */ "\n"
             "%s\n\n"
             "%s\0"
-/*  4344 */ "Fil\0"
-/*  4348 */ "KWd\0"
-/*  4352 */ "Mbr\0"
-/*  4356 */ "Tim\0"
-/*  4360 */ "Cpx\0"
-/*  4364 */ "no \0"
-/*  4368 */ "Num\0"
-/*  4372 */ "opt\0"
-/*  4376 */ "YES\0"
-/*  4380 */ "Str\0"
-/*  4384 */ "\t\t\t\t- \0"
-/*  4391 */ "\t\t\t\t-- and \0"
-/*  4403 */ "\t\t\t\t%s\n\0"
-/*  4411 */ "   \0"
-/*  4415 */ "  \0"
-/*  4418 */ "\t\t\t\t- may appear up to %d times\n\0"
-/*  4451 */ "The valid \"%s\" option keywords are:\n\0"
-/*  4488 */ "These additional options are:\0"
-/*  4518 */ "The next option supports vendor supported extra options:";
+/*  4360 */ "Fil\0"
+/*  4364 */ "KWd\0"
+/*  4368 */ "Mbr\0"
+/*  4372 */ "Tim\0"
+/*  4376 */ "Cpx\0"
+/*  4380 */ "no \0"
+/*  4384 */ "Num\0"
+/*  4388 */ "opt\0"
+/*  4392 */ "YES\0"
+/*  4396 */ "Str\0"
+/*  4400 */ "\t\t\t\t- \0"
+/*  4407 */ "\t\t\t\t-- and \0"
+/*  4419 */ "\t\t\t\t%s\n\0"
+/*  4427 */ "   \0"
+/*  4431 */ "%s error:  %s exceeds %s keyword count\n\0"
+/*  4471 */ "  \0"
+/*  4474 */ "\t\t\t\t- may appear up to %d times\n\0"
+/*  4507 */ "The valid \"%s\" option keywords are:\n\0"
+/*  4544 */ "These additional options are:\0"
+/*  4574 */ "The next option supports vendor supported extra options:";
 
 
   /*
@@ -385,7 +387,7 @@ static char const usage_txt[4575] =
    *  Aren't you glad you don't maintain this by hand?
    */
   usage_text_t option_usage_text = {
-    144,
+    145,
     eng_zGnuBoolArg, eng_zGnuKeyArg,  eng_zGnuFileArg, eng_zGnuKeyLArg,
     eng_zGnuTimeArg, eng_zGnuNumArg,  eng_zGnuStrArg,
     {
@@ -393,37 +395,37 @@ static char const usage_txt[4575] =
       usage_txt + 224, usage_txt + 260, usage_txt + 310, usage_txt + 343,
       usage_txt + 434, usage_txt + 493, usage_txt + 543, usage_txt + 547,
       usage_txt + 574, usage_txt + 623, usage_txt + 655, usage_txt + 707,
-      usage_txt + 715, usage_txt + 752, usage_txt + 777, usage_txt + 803,
-      usage_txt + 843, usage_txt + 980, usage_txt +1028, usage_txt +1082,
-      usage_txt +1095, usage_txt +1103, usage_txt +1145, usage_txt +1169,
-      usage_txt +1209, usage_txt +1224, usage_txt +1254, usage_txt +1280,
-      usage_txt +1293, usage_txt +1307, usage_txt +1354, usage_txt +1360,
-      usage_txt +1463, usage_txt +1475, usage_txt +1526, usage_txt +1555,
-      usage_txt +1606, usage_txt +1640, usage_txt +1681, usage_txt +1704,
-      usage_txt +1730, usage_txt +1761, usage_txt +1775, usage_txt +1790,
-      usage_txt +1821, usage_txt +1848, usage_txt +1954, usage_txt +1960,
-      usage_txt +1966, usage_txt +1973, usage_txt +1984, usage_txt +2010,
-      usage_txt +2036, usage_txt +2079, usage_txt +2115, usage_txt +2166,
-      usage_txt +2222, usage_txt +2256, usage_txt +2294, usage_txt +2359,
-      usage_txt +2402, usage_txt +2437, usage_txt +2478, usage_txt +2518,
-      usage_txt +2545, usage_txt +2612, usage_txt +2660, usage_txt +2693,
-      usage_txt +2718, usage_txt +2766, usage_txt +2801, usage_txt +2839,
-      usage_txt +2866, usage_txt +2915, usage_txt +2920, usage_txt +2938,
-      usage_txt +2973, usage_txt +3017, usage_txt +3071, usage_txt +3117,
-      usage_txt +3166, usage_txt +3219, usage_txt +3227, usage_txt +3275,
-      usage_txt +3300, usage_txt +3334, usage_txt +3363, usage_txt +3382,
-      usage_txt +3416, usage_txt +3452, usage_txt +3490, usage_txt +3546,
-      usage_txt +3572, usage_txt +3638, usage_txt +3651, usage_txt +3682,
-      usage_txt +3719, usage_txt +3747, usage_txt +3753, usage_txt +3802,
-      usage_txt +3816, usage_txt +3862, usage_txt +3890, usage_txt +3935,
-      usage_txt +3977, usage_txt +3991, usage_txt +4016, usage_txt +4056,
-      usage_txt +4099, usage_txt +4103, usage_txt +4322, usage_txt +4325,
-      usage_txt +4332, usage_txt +4336, usage_txt +4344, usage_txt +4348,
-      usage_txt +4352, usage_txt +4356, usage_txt +4360, usage_txt +4364,
+      usage_txt + 715, usage_txt + 752, usage_txt + 777, usage_txt + 819,
+      usage_txt + 859, usage_txt + 996, usage_txt +1044, usage_txt +1098,
+      usage_txt +1111, usage_txt +1119, usage_txt +1161, usage_txt +1185,
+      usage_txt +1225, usage_txt +1240, usage_txt +1270, usage_txt +1296,
+      usage_txt +1309, usage_txt +1323, usage_txt +1370, usage_txt +1376,
+      usage_txt +1479, usage_txt +1491, usage_txt +1542, usage_txt +1571,
+      usage_txt +1622, usage_txt +1656, usage_txt +1697, usage_txt +1720,
+      usage_txt +1746, usage_txt +1777, usage_txt +1791, usage_txt +1806,
+      usage_txt +1837, usage_txt +1864, usage_txt +1970, usage_txt +1976,
+      usage_txt +1982, usage_txt +1989, usage_txt +2000, usage_txt +2026,
+      usage_txt +2052, usage_txt +2095, usage_txt +2131, usage_txt +2182,
+      usage_txt +2238, usage_txt +2272, usage_txt +2310, usage_txt +2375,
+      usage_txt +2418, usage_txt +2453, usage_txt +2494, usage_txt +2534,
+      usage_txt +2561, usage_txt +2628, usage_txt +2676, usage_txt +2709,
+      usage_txt +2734, usage_txt +2782, usage_txt +2817, usage_txt +2855,
+      usage_txt +2882, usage_txt +2931, usage_txt +2936, usage_txt +2954,
+      usage_txt +2989, usage_txt +3033, usage_txt +3087, usage_txt +3133,
+      usage_txt +3182, usage_txt +3235, usage_txt +3243, usage_txt +3291,
+      usage_txt +3316, usage_txt +3350, usage_txt +3379, usage_txt +3398,
+      usage_txt +3432, usage_txt +3468, usage_txt +3506, usage_txt +3562,
+      usage_txt +3588, usage_txt +3654, usage_txt +3667, usage_txt +3698,
+      usage_txt +3735, usage_txt +3763, usage_txt +3769, usage_txt +3818,
+      usage_txt +3832, usage_txt +3878, usage_txt +3906, usage_txt +3951,
+      usage_txt +3993, usage_txt +4007, usage_txt +4032, usage_txt +4072,
+      usage_txt +4115, usage_txt +4119, usage_txt +4338, usage_txt +4341,
+      usage_txt +4348, usage_txt +4352, usage_txt +4360, usage_txt +4364,
       usage_txt +4368, usage_txt +4372, usage_txt +4376, usage_txt +4380,
-      usage_txt +4384, usage_txt +4391, usage_txt +4403, usage_txt +4411,
-      usage_txt +4415, usage_txt +4418, usage_txt +4451, usage_txt +4488,
-      usage_txt +4518
+      usage_txt +4384, usage_txt +4388, usage_txt +4392, usage_txt +4396,
+      usage_txt +4400, usage_txt +4407, usage_txt +4419, usage_txt +4427,
+      usage_txt +4431, usage_txt +4471, usage_txt +4474, usage_txt +4507,
+      usage_txt +4544, usage_txt +4574
     }
   };
 
diff --git a/src/libopts/boolean.c b/src/libopts/boolean.c
index 37d18e1..f0e5498 100644
--- a/src/libopts/boolean.c
+++ b/src/libopts/boolean.c
@@ -2,7 +2,7 @@
 /**
  * \file boolean.c
  *
- * Time-stamp:      "2010-07-10 11:02:10 bkorb"
+ * Time-stamp:      "2012-03-31 13:46:19 bkorb"
  *
  *   Automated Options Paged Usage module.
  *
@@ -43,16 +43,18 @@
  *  it is an empty string or it is a number that evaluates to zero.
 =*/
 void
-optionBooleanVal( tOptions* pOpts, tOptDesc* pOD )
+optionBooleanVal(tOptions * pOpts, tOptDesc * pOD )
 {
     char* pz;
-    ag_bool  res = AG_TRUE;
+    bool  res = true;
+
+    (void)pOpts;
 
     if ((pOD->fOptState & OPTST_RESET) != 0)
         return;
 
     if (pOD->optArg.argString == NULL) {
-        pOD->optArg.argBool = AG_FALSE;
+        pOD->optArg.argBool = false;
         return;
     }
 
@@ -69,12 +71,12 @@ optionBooleanVal( tOptions* pOpts, tOptDesc* pOD )
     case 'F':
     case 'f':
     case NUL:
-        res = AG_FALSE;
+        res = false;
         break;
     case '#':
         if (pOD->optArg.argString[1] != 'f')
             break;
-        res = AG_FALSE;
+        res = false;
     }
 
     if (pOD->fOptState & OPTST_ALLOC_ARG) {
diff --git a/src/libopts/check.c b/src/libopts/check.c
index 003fe13..019a235 100644
--- a/src/libopts/check.c
+++ b/src/libopts/check.c
@@ -3,7 +3,7 @@
  *
  * @brief consistency checks.
  *
- *  Time-stamp:      "2011-05-24 17:50:10 bkorb"
+ *  Time-stamp:      "2012-03-31 13:46:35 bkorb"
  *
  *  This file contains the routines that deal with processing quoted strings
  *  into an internal format.
@@ -32,7 +32,7 @@
 /**
  *  Check for conflicts based on "must" and "cannot" attributes.
  */
-static ag_bool
+static bool
 has_conflict(tOptions * pOpts, tOptDesc * pOD)
 {
     if (pOD->pOptMust != NULL) {
@@ -43,7 +43,7 @@ has_conflict(tOptions * pOpts, tOptDesc * pOD)
             if (UNUSED_OPT(p)) {
                 const tOptDesc * pN = pOpts->pOptDesc + pMust[-1];
                 fprintf(stderr, zReqFmt, pOD->pz_Name, pN->pz_Name);
-                return AG_TRUE;
+                return true;
             }
         }
     }
@@ -56,26 +56,28 @@ has_conflict(tOptions * pOpts, tOptDesc * pOD)
             if (SELECTED_OPT(p)) {
                 const tOptDesc* pN = pOpts->pOptDesc + pCant[-1];
                 fprintf(stderr, zCantFmt, pOD->pz_Name, pN->pz_Name);
-                return AG_TRUE;
+                return true;
             }
         }
     }
 
-    return AG_FALSE;
+    return false;
 }
 
 /**
  *  Check that the option occurs often enough.  Too often is already checked.
  */
-static ag_bool
+static bool
 occurs_enough(tOptions * pOpts, tOptDesc * pOD)
 {
+    (void)pOpts;
+
     /*
      *  IF the occurrence counts have been satisfied,
      *  THEN there is no problem.
      */
     if (pOD->optOccCt >= pOD->optMinCt)
-        return AG_TRUE;
+        return true;
 
     /*
      *  IF MUST_SET means SET and PRESET are okay,
@@ -83,12 +85,12 @@ occurs_enough(tOptions * pOpts, tOptDesc * pOD)
      */
     if (  (pOD->fOptState & OPTST_MUST_SET)
        && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) )
-        return AG_TRUE;
+        return true;
 
     if (pOD->optMinCt > 1)
          fprintf(stderr, zNotEnough, pOD->pz_Name, pOD->optMinCt);
     else fprintf(stderr, zNeedOne, pOD->pz_Name);
-    return AG_FALSE;
+    return false;
 }
 
 /**
@@ -96,7 +98,7 @@ occurs_enough(tOptions * pOpts, tOptDesc * pOD)
  *
  *  Make sure that the argument list passes our consistency tests.
  */
-LOCAL ag_bool
+LOCAL bool
 is_consistent(tOptions * pOpts)
 {
     tOptDesc * pOD   = pOpts->pOptDesc;
@@ -114,7 +116,7 @@ is_consistent(tOptions * pOpts)
          */
         if (SELECTED_OPT(pOD)) {
             if (has_conflict(pOpts, pOD))
-                return AG_FALSE;
+                return false;
         }
 
         /*
@@ -126,7 +128,7 @@ is_consistent(tOptions * pOpts)
            || (pOD->optEquivIndex == pOD->optIndex) )
 
             if (! occurs_enough(pOpts, pOD))
-                return AG_FALSE;
+                return false;
 
         if (--oCt <= 0)
             break;
@@ -145,7 +147,7 @@ is_consistent(tOptions * pOpts)
         if ((pOpts->fOptSet & OPTPROC_NO_ARGS) != 0) {
             if (pOpts->origArgCt > pOpts->curOptIdx) {
                 fprintf(stderr, zNoArgs, pOpts->pzProgName);
-                return AG_FALSE;
+                return false;
             }
         }
 
@@ -155,10 +157,10 @@ is_consistent(tOptions * pOpts)
         else if ((pOpts->fOptSet & OPTPROC_ARGS_REQ) != 0) {
             if (pOpts->origArgCt <= pOpts->curOptIdx) {
                 fprintf(stderr, zArgsMust, pOpts->pzProgName);
-                return AG_FALSE;
+                return false;
             }
         }
     }
 
-    return AG_TRUE;
+    return true;
 }
diff --git a/src/libopts/compat/compat.h b/src/libopts/compat/compat.h
index 9fe9b29..9d1c02a 100644
--- a/src/libopts/compat/compat.h
+++ b/src/libopts/compat/compat.h
@@ -3,7 +3,7 @@
 /**
  * \file compat.h --- fake the preprocessor into handlng portability
  *
- *  Time-stamp:      "2012-02-12 09:00:09 bkorb"
+ *  Time-stamp:      "2012-02-28 19:40:44 bkorb"
  *
  *  compat.h is free software.
  *  This file is part of AutoGen.
@@ -181,15 +181,15 @@
 #include <setjmp.h>
 #include <signal.h>
 
-#if defined( HAVE_STDINT_H )
+#if defined(HAVE_STDINT_H)
 #  include <stdint.h>
-#elif defined( HAVE_INTTYPES_H )
+
+#elif defined(HAVE_INTTYPES_H)
 #  include <inttypes.h>
 #endif
 
 #include <stdlib.h>
 #include <string.h>
-
 #include <time.h>
 
 #ifdef HAVE_UTIME_H
@@ -200,6 +200,17 @@
 #  include <unistd.h>
 #endif
 
+#ifdef HAVE_STDBOOL_H
+#  include <stdbool.h>
+#else
+   typedef enum { false = 0, true = 1 } _Bool;
+#  define bool _Bool
+
+   /* The other macros must be usable in preprocessor directives.  */
+#  define false 0
+#  define true 1
+#endif
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  FIXUPS and CONVIENCE STUFF:
diff --git a/src/libopts/compat/pathfind.c b/src/libopts/compat/pathfind.c
index 2d5b27d..2e6f881 100644
--- a/src/libopts/compat/pathfind.c
+++ b/src/libopts/compat/pathfind.c
@@ -4,7 +4,7 @@
 
 /*
  * Author:           Gary V Vaughan <address@hidden>
- * Time-stamp:       "2010-07-17 09:50:32 bkorb"
+ * Time-stamp:       "2012-03-31 13:44:42 bkorb"
  */
 
 /* Code: */
@@ -309,7 +309,7 @@ extract_colon_unit( char* pzDir, char const *string, int 
*p_index )
                 goto copy_done;
             }
 
-            if ((pzDest - pzDir) >= AG_PATH_MAX)
+            if ((unsigned long)(pzDest - pzDir) >= AG_PATH_MAX)
                 break;
         } copy_done:;
 
diff --git a/src/libopts/configfile.c b/src/libopts/configfile.c
index e3da1bb..56e22b5 100644
--- a/src/libopts/configfile.c
+++ b/src/libopts/configfile.c
@@ -1,7 +1,7 @@
 /**
  * \file configfile.c
  *
- *  Time-stamp:      "2012-02-25 12:54:32 bkorb"
+ *  Time-stamp:      "2012-03-31 13:56:11 bkorb"
  *
  *  configuration/rc/ini file handling.
  *
@@ -52,7 +52,7 @@ static int
 parse_xml_encoding(char ** ppz);
 
 static char *
-trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode);
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode);
 
 static void
 cook_xml_text(char * pzData);
@@ -202,7 +202,7 @@ optionFindValue(const tOptDesc* pOptDesc, char const* 
pzName,
         }
         if (pRes == NULL)
             errno = ENOENT;
-    } while (0);
+    } while (false);
 
     return pRes;
 }
@@ -210,6 +210,8 @@ optionFindValue(const tOptDesc* pOptDesc, char const* 
pzName,
 
 /*=export_func  optionFindNextValue
  *
+ * FIXME: the handling of 'pzName' and 'pzVal' is just wrong.
+ *
  * what:  find a hierarcicaly valued option instance
  * arg:   + const tOptDesc* + pOptDesc + an option with a nested arg type +
  * arg:   + const tOptionValue* + pPrevVal + the last entry +
@@ -238,9 +240,12 @@ tOptionValue const *
 optionFindNextValue(const tOptDesc * pOptDesc, const tOptionValue * pPrevVal,
                     char const * pzName, char const * pzVal)
 {
-    int foundOldVal = 0;
+    bool old_found = false;
     tOptionValue* pRes = NULL;
 
+    (void)pzName;
+    (void)pzVal;
+
     if (  (pOptDesc == NULL)
        || (OPTST_GET_ARGTYPE(pOptDesc->fOptState) != OPARG_TYPE_HIERARCHY))  {
         errno = EINVAL;
@@ -255,23 +260,18 @@ optionFindNextValue(const tOptDesc * pOptDesc, const 
tOptionValue * pPrevVal,
         int    ct   = pAL->useCt;
         void** ppOV = (void**)pAL->apzArgs;
 
-        if (ct == 0) {
-            errno = ENOENT;
-            break;
-        }
-
         while (--ct >= 0) {
             tOptionValue* pOV = *(ppOV++);
-            if (foundOldVal) {
+            if (old_found) {
                 pRes = pOV;
                 break;
             }
             if (pOV == pPrevVal)
-                foundOldVal = 1;
+                old_found = true;
         }
         if (pRes == NULL)
             errno = ENOENT;
-    } while (0);
+    } while (false);
 
     return pRes;
 }
@@ -431,7 +431,7 @@ file_preset(tOptions * opts, char const * fname, int dir)
 
     do  {
         optst.flags = st_flags;
-        while (IS_WHITESPACE_CHAR(*ftext))  ftext++;
+        ftext = SPN_WHITESPACE_CHARS(ftext);
 
         if (IS_VAR_FIRST_CHAR(*ftext)) {
             ftext = handle_cfg(opts, &optst, ftext, dir);
@@ -508,8 +508,8 @@ handle_cfg(tOptions * pOpts, tOptState * pOS, char * 
pzText, int dir)
     if (pzEnd == NULL)
         return pzText + strlen(pzText);
 
-    while (IS_VALUE_NAME_CHAR(*pzText)) pzText++;
-    while (IS_WHITESPACE_CHAR(*pzText)) pzText++;
+    pzText = SPN_VALUE_NAME_CHARS(pzText);
+    pzText = SPN_WHITESPACE_CHARS(pzText);
     if (pzText > pzEnd) {
     name_only:
         *pzEnd++ = NUL;
@@ -523,7 +523,7 @@ handle_cfg(tOptions * pOpts, tOptState * pOS, char * 
pzText, int dir)
      *  is an invalid format and we give up parsing the text.
      */
     if ((*pzText == '=') || (*pzText == ':')) {
-        while (IS_WHITESPACE_CHAR(*++pzText))   ;
+        pzText = SPN_WHITESPACE_CHARS(pzText+1);
         if (pzText > pzEnd)
             goto name_only;
     } else if (! IS_WHITESPACE_CHAR(pzText[-1]))
@@ -630,9 +630,9 @@ handle_directive(tOptions * pOpts, char * pzText)
 static char *
 aoflags_directive(tOptions * pOpts, char * pzText)
 {
-    char * pz = pzText;
+    char * pz;
 
-    while (IS_WHITESPACE_CHAR(*++pz))  ;
+    pz = SPN_WHITESPACE_CHARS(pzText+1);
     pzText = strchr(pz, '>');
     if (pzText != NULL) {
 
@@ -665,7 +665,7 @@ program_directive(tOptions * pOpts, char * pzText)
     memcpy(ttl + sizeof(ttlfmt) - 1, zCfgProg, ttl_len - (sizeof(ttlfmt) - 1));
 
     do  {
-        while (IS_WHITESPACE_CHAR(*++pzText))  ;
+        pzText = SPN_WHITESPACE_CHARS(pzText+1);
 
         if (  (strneqvcmp(pzText, pOpts->pzProgName, (int)name_len) == 0)
            && (IS_END_XML_TOKEN_CHAR(pzText[name_len])) ) {
@@ -809,28 +809,35 @@ parse_xml_encoding(char ** ppz)
  * except for OPTION_LOAD_UNCOOKED.
  */
 static char *
-trim_xml_text(char * pztxt, char const * pznm, tOptionLoadMode mode)
+trim_xml_text(char * intxt, char const * pznm, tOptionLoadMode mode)
 {
     static char const fmt[] = "</%s>";
-    char   z[64], *pz = z;
     size_t len = strlen(pznm) + sizeof(fmt) - 2 /* for %s */;
+    char * etext;
 
-    if (len > sizeof(z))
-        pz = AGALOC(len, "scan name");
+    {
+        char z[64], *pz = z;
+        if (len >= sizeof(z))
+            pz = AGALOC(len, "scan name");
+
+        len = sprintf(pz, fmt, pznm);
+        *intxt = ' ';
+        etext = strstr(intxt, pz);
+        if (pz != z) AGFREE(pz);
+    }
 
-    sprintf(pz, fmt, pznm);
-    *pztxt = ' ';
-    pztxt = strstr(pztxt, pz);
-    if (pz != z) AGFREE(pz);
+    if (etext == NULL)
+        return etext;
 
-    if (pztxt == NULL)
-        return pztxt;
+    {
+        char * result = etext + len;
 
-    if (mode != OPTION_LOAD_UNCOOKED)
-        while (IS_WHITESPACE_CHAR(pztxt[-1]))   len++, pztxt--;
+        if (mode != OPTION_LOAD_UNCOOKED)
+            etext = SPN_WHITESPACE_BACK(intxt, etext);
 
-    *pztxt = NUL;
-    return pztxt + len - 1 /* for NUL byte */;
+        *etext = NUL;
+        return result;
+    }
 }
 
 /**
@@ -889,14 +896,14 @@ handle_struct(tOptions * pOpts, tOptState * pOS, char * 
pzText, int dir)
     char* pzData;
     char* pcNulPoint;
 
-    while (IS_VALUE_NAME_CHAR(*pzText))  pzText++;
+    pzText = SPN_VALUE_NAME_CHARS(pzText);
     pcNulPoint = pzText;
     valu.valType = OPARG_TYPE_STRING;
 
     switch (*pzText) {
     case ' ':
     case '\t':
-        pzText = parseAttributes(pOpts, pzText, &mode, &valu);
+        pzText = parse_attrs(pOpts, pzText, &mode, &valu);
         if (*pzText == '>')
             break;
         if (*pzText != '/')
@@ -933,7 +940,7 @@ handle_struct(tOptions * pOpts, tOptState * pOS, char * 
pzText, int dir)
 
     /*
      *  Rejoin the name and value for parsing by "loadOptionLine()".
-     *  Erase any attributes parsed by "parseAttributes()".
+     *  Erase any attributes parsed by "parse_attrs()".
      */
     memset(pcNulPoint, ' ', pzData - pcNulPoint);
 
@@ -1159,11 +1166,8 @@ optionLoadOpt(tOptions * pOpts, tOptDesc * pOptDesc)
  *  Parse the various attributes of an XML-styled config file entry
  */
 LOCAL char*
-parseAttributes(
-    tOptions*           pOpts,
-    char*               pzText,
-    tOptionLoadMode*    pMode,
-    tOptionValue*       pType )
+parse_attrs(tOptions * pOpts, char * pzText, tOptionLoadMode * pMode,
+            tOptionValue * pType)
 {
     size_t len;
 
@@ -1177,9 +1181,8 @@ parseAttributes(
             case NUL: return NULL;
             }
 
-        while (IS_WHITESPACE_CHAR(*++pzText))     ;
-        len = 0;
-        while (IS_LOWER_CASE_CHAR(pzText[len]))   len++;
+        pzText = SPN_WHITESPACE_CHARS(pzText+1);
+        len = SPN_LOWER_CASE_CHARS(pzText) - pzText;
 
         switch (find_xat_attribute_id(pzText, len)) {
         case XAT_KWD_TYPE:
@@ -1237,6 +1240,9 @@ parseAttributes(
 static char*
 parse_keyword(tOptions * pOpts, char * pzText, tOptionValue * pType)
 {
+    (void)pOpts;
+    (void)pType;
+
     return skip_unkn(pzText);
 }
 
@@ -1249,6 +1255,9 @@ parse_keyword(tOptions * pOpts, char * pzText, 
tOptionValue * pType)
 static char*
 parse_set_mem(tOptions * pOpts, char * pzText, tOptionValue * pType)
 {
+    (void)pOpts;
+    (void)pType;
+
     return skip_unkn(pzText);
 }
 
@@ -1264,16 +1273,15 @@ parse_value(char * pzText, tOptionValue * pType)
     if (*(pzText++) != '=')
         goto woops;
 
-    while (IS_OPTION_NAME_CHAR(pzText[len]))  len++;
-    pzText += len;
+    len = SPN_OPTION_NAME_CHARS(pzText) - pzText;
 
-    if ((len == 0) || (! IS_END_XML_TOKEN_CHAR(*pzText))) {
+    if ((len == 0) || (! IS_END_XML_TOKEN_CHAR(pzText[len]))) {
     woops:
         pType->valType = OPARG_TYPE_NONE;
-        return skip_unkn(pzText);
+        return skip_unkn(pzText + len);
     }
 
-    switch (find_value_type_id(pzText - len, len)) {
+    switch (find_value_type_id(pzText, len)) {
     default:
     case VTP_KWD_INVALID: goto woops;
 
@@ -1304,7 +1312,7 @@ parse_value(char * pzText, tOptionValue * pType)
         pType->valType = OPARG_TYPE_HIERARCHY;
     }
 
-    return pzText;
+    return pzText + len;
 }
 
 
diff --git a/src/libopts/cook.c b/src/libopts/cook.c
index c681ea3..f34a6ed 100644
--- a/src/libopts/cook.c
+++ b/src/libopts/cook.c
@@ -1,7 +1,7 @@
 /**
  * \file cook.c
  *
- *  Time-stamp:      "2012-02-12 09:00:47 bkorb"
+ *  Time-stamp:      "2012-02-28 19:40:47 bkorb"
  *
  *  This file contains the routines that deal with processing quoted strings
  *  into an internal format.
@@ -28,7 +28,7 @@
  */
 
 /* = = = START-STATIC-FORWARD = = = */
-static ag_bool
+static bool
 contiguous_quote(char ** pps, char * pq, int * lnct_p);
 /* = = = END-STATIC-FORWARD = = = */
 
@@ -130,7 +130,7 @@ ao_string_cook_escape_char(char const* pzIn, char* pRes, 
uint_t nl)
  *  A quoted string has been found.
  *  Find the end of it and compress any escape sequences.
  */
-static ag_bool
+static bool
 contiguous_quote(char ** pps, char * pq, int * lnct_p)
 {
     char * ps = *pps + 1;
@@ -149,7 +149,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
         case '\'':
             *pq  = *(ps++);  /* assign new quote character and return */
             *pps = ps;
-            return AG_TRUE;
+            return true;
 
         case '/':
             /*
@@ -158,7 +158,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
             switch (ps[1]) {
             default:
                 *pps = NULL;
-                return AG_FALSE;
+                return false;
 
             case '/':
                 /*
@@ -167,7 +167,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
                 ps = strchr(ps, NL);
                 if (ps == NULL) {
                     *pps = NULL;
-                    return AG_FALSE;
+                    return false;
                 }
                 break;
 
@@ -179,7 +179,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
                  */
                 if (p == NULL) {
                     *pps = NULL;
-                    return AG_FALSE;
+                    return false;
                 }
 
                 while (ps < p) {
@@ -198,7 +198,7 @@ contiguous_quote(char ** pps, char * pq, int * lnct_p)
              *  The series of quoted strings has come to an end.
              */
             *pps = ps;
-            return AG_FALSE;
+            return false;
         }
     }
 }
diff --git a/src/libopts/enum.c b/src/libopts/enum.c
index 6ce6b4b..2a9f9bc 100644
--- a/src/libopts/enum.c
+++ b/src/libopts/enum.c
@@ -2,7 +2,7 @@
 /**
  * \file enumeration.c
  *
- * Time-stamp:      "2012-01-29 19:07:59 bkorb"
+ * Time-stamp:      "2012-03-31 13:22:33 bkorb"
  *
  *   Automated Options Paged Usage module.
  *
@@ -166,7 +166,16 @@ enum_err(tOptions * pOpts, tOptDesc * pOD,
     }
 }
 
-
+/**
+ * Convert a name or number into a binary number.
+ * "~0" and "-1" will be converted to the largest value in the enumeration.
+ *
+ * @param pzName     the keyword name (number) to convert
+ * @param pOpts      the program's option descriptor
+ * @param pOD        the option descriptor for this option
+ * @param paz_names  the list of keywords for this option
+ * @param name_ct    the count of keywords
+ */
 static uintptr_t
 find_name(char const * pzName, tOptions * pOpts, tOptDesc * pOD,
           char const * const *  paz_names, unsigned int name_ct)
@@ -184,10 +193,19 @@ find_name(char const * pzName, tOptions * pOpts, tOptDesc 
* pOD,
         unsigned long val = strtoul(pz, &pz, 0);
         if ((*pz == NUL) && (val < name_ct))
             return (uintptr_t)val;
+        pz_enum_err_fmt = zTooLarge;
+        option_usage_fp = stderr;
         enum_err(pOpts, pOD, paz_names, (int)name_ct);
         return name_ct;
     }
 
+    if (IS_INVERSION_CHAR(*pzName) && (pzName[2] == NUL)) {
+        if (  ((pzName[0] == '~') && (pzName[1] == '0'))
+           || ((pzName[0] == '-') && (pzName[1] == '1')))
+        return (uintptr_t)(name_ct - 1);
+        goto oops;
+    }
+
     /*
      *  Look for an exact match, but remember any partial matches.
      *  Multiple partial matches means we have an ambiguous match.
@@ -197,13 +215,18 @@ find_name(char const * pzName, tOptions * pOpts, tOptDesc 
* pOD,
             if (paz_names[idx][len] == NUL)
                 return idx;  /* full match */
 
-            res = (res != name_ct) ? ~0 : idx; /* save partial match */
+            if (res == name_ct)
+                res = idx; /* save partial match */
+            else
+                res = ~0;  /* may yet find full match */
         }
     }
 
     if (res < name_ct)
         return res; /* partial match */
 
+oops:
+
     pz_enum_err_fmt = (res == name_ct) ? zNoKey : zAmbigKey;
     option_usage_fp = stderr;
     enum_err(pOpts, pOD, paz_names, (int)name_ct);
@@ -226,9 +249,9 @@ find_name(char const * pzName, tOptions * pOpts, tOptDesc * 
pOD,
 char const *
 optionKeywordName(tOptDesc * pOD, unsigned int enum_val)
 {
-    tOptDesc od;
+    tOptDesc od = {
+        .optArg.argEnum = enum_val };
 
-    od.optArg.argEnum = enum_val;
     (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od );
     return od.optArg.argString;
 }
@@ -317,6 +340,7 @@ set_memb_usage(tOptions * pOpts, tOptDesc * pOD, char const 
* const * paz_names,
     /*
      *  print the list of enumeration names.
      */
+    (void)pOpts;
     enum_err(OPTPROC_EMIT_USAGE, pOD, paz_names, (int)name_ct );
 }
 
@@ -331,6 +355,7 @@ set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const 
* const * paz_names,
     uintptr_t  bits = (uintptr_t)pOD->optCookie;
     size_t     len  = 0;
 
+    (void)pOpts;
     bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1;
 
     while (bits != 0) {
@@ -352,6 +377,7 @@ set_memb_names(tOptions * pOpts, tOptDesc * pOD, char const 
* const * paz_names,
     unsigned int ix = 0;
     size_t     len  = NONE_STR_LEN + 1;
 
+    (void)pOpts;
     bits &= ((uintptr_t)1 << (uintptr_t)name_ct) - (uintptr_t)1;
 
     /*
@@ -494,7 +520,7 @@ optionSetMembers(tOptions * pOpts, tOptDesc * pOD,
                 if (iv)
                      res &= ~bit;
                 else res |= bit;
-            } while (0);
+            } while (false);
 
             if (pzArg[len] == NUL)
                 break;
diff --git a/src/libopts/env.c b/src/libopts/env.c
index 60e8a03..4dd18fa 100644
--- a/src/libopts/env.c
+++ b/src/libopts/env.c
@@ -2,7 +2,7 @@
 /**
  * \file environment.c
  *
- * Time-stamp:      "2011-07-19 17:43:34 bkorb"
+ * Time-stamp:      "2012-04-01 05:59:15 bkorb"
  *
  *  This file contains all of the routines that must be linked into
  *  an executable to use the generated option processing.  The optional
@@ -45,11 +45,11 @@ do_env_opt(tOptState * os, char * env_name,
 LOCAL void
 doPrognameEnv(tOptions * pOpts, teEnvPresetType type)
 {
-    char const*   pczOptStr = getenv(pOpts->pzPROGNAME);
+    char const *  pczOptStr = getenv(pOpts->pzPROGNAME);
     token_list_t* pTL;
     int           sv_argc;
     tAoUI         sv_flag;
-    char**        sv_argv;
+    char **       sv_argv;
 
     /*
      *  No such beast?  Then bail now.
@@ -78,7 +78,10 @@ doPrognameEnv(tOptions * pOpts, teEnvPresetType type)
      *  The option scanning code will skip the "program name" at the start
      *  of this list of tokens, so we accommodate this way ....
      */
-    pOpts->origArgVect = (char**)(pTL->tkn_list - 1);
+    {
+        uintptr_t v = (uintptr_t)(pTL->tkn_list);
+        pOpts->origArgVect = (void *)(v - sizeof(char *));
+    }
     pOpts->origArgCt   = pTL->tkn_ct   + 1;
     pOpts->fOptSet    &= ~OPTPROC_ERRSTOP;
 
diff --git a/src/libopts/find.c b/src/libopts/find.c
index aa730c6..f6510ee 100644
--- a/src/libopts/find.c
+++ b/src/libopts/find.c
@@ -99,7 +99,7 @@ opt_ambiguities(tOptions * opts, char const * name, int 
nm_len)
  */
 static int
 opt_match_ct(tOptions * opts, char const * name, int nm_len,
-             int * ixp, ag_bool * disable)
+             int * ixp, bool * disable)
 {
     int   matchCt  = 0;
     int   idx      = 0;
@@ -136,7 +136,7 @@ opt_match_ct(tOptions * opts, char const * name, int nm_len,
         else if (  (pOD->pz_DisableName != NULL)
                 && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0)
                 )  {
-            *disable = AG_TRUE;
+            *disable = true;
 
             /*
              *  IF we have a complete match
@@ -173,7 +173,7 @@ opt_match_ct(tOptions * opts, char const * name, int nm_len,
  * @param st        state about current option
  */
 static tSuccess
-opt_set(tOptions * opts, char * arg, int idx, ag_bool disable, tOptState * st)
+opt_set(tOptions * opts, char * arg, int idx, bool disable, tOptState * st)
 {
     tOptDesc * pOD = opts->pOptDesc + idx;
 
@@ -335,7 +335,7 @@ opt_find_long(tOptions * pOpts, char const * opt_name, 
tOptState * pOptState)
     int     nm_len = parse_opt(&opt_name, &opt_arg, name_buf, 
sizeof(name_buf));
 
     int     matchIdx = 0;
-    ag_bool disable  = AG_FALSE;
+    bool disable  = false;
     int     match_ct =
         opt_match_ct(pOpts, opt_name, nm_len, &matchIdx, &disable);
 
diff --git a/src/libopts/genshell.c b/src/libopts/genshell.c
index c8d3047..16ca245 100644
--- a/src/libopts/genshell.c
+++ b/src/libopts/genshell.c
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.c)
  *  
- *  It has been AutoGen-ed  February 26, 2012 at 11:08:41 AM by AutoGen 
5.15pre14
+ *  It has been AutoGen-ed  May  6, 2012 at 04:20:59 PM by AutoGen 5.16pre36
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 36:3:11 templates.
+ * Generated from AutoOpts 36:4:11 templates.
  *
  *  AutoOpts is a copyrighted work.  This source file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -39,6 +39,7 @@
  *  with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#ifndef __doxygen__
 #define OPTION_CODE_COMPILE 1
 #include "genshell.h"
 #include <sys/types.h>
@@ -66,7 +67,7 @@ extern tUsageProc genshelloptUsage;
 /*
  *  genshellopt option static const strings
  */
-static char const genshellopt_opt_strs[1691] =
+static char const genshellopt_opt_strs[1690] =
 /*     0 */ "genshellopt 1\n"
             "Copyright (C) 1999-2012 Bruce Korb, all rights reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
@@ -74,13 +75,13 @@ static char const genshellopt_opt_strs[1691] =
             "GNU General Public License, version 3 or later\n"
             "    <http://gnu.org/licenses/gpl.html>\n\0"
 /*   260 */ "genshellopt is free software: you can redistribute it and/or 
modify it\n"
-            "under the terms of the GNU General Public License as published by 
the\n"
-            "Free Software Foundation, either version 3 of the License, or (at 
your\n"
-            "option) any later version.\n\n"
+            "under the terms of the GNU General Public License as published by 
the Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
             "genshellopt is distributed in the hope that it will be useful, 
but WITHOUT\n"
             "ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or\n"
-            "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public 
License\n"
-            "for more details.\n\n"
+            "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public 
License for\n"
+            "more details.\n\n"
             "You should have received a copy of the GNU General Public License 
along\n"
             "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
 /*   871 */ "Output Script File\0"
@@ -102,13 +103,13 @@ static char const genshellopt_opt_strs[1691] =
 /*  1235 */ "address@hidden"
 /*  1271 */ "\n"
             "Note that ``shell'' is only useful if the output file does not 
already\n"
-            "exist.  If it does, then the shell name and optional first 
argument will\n"
-            "be extracted from the script file.\n\0"
+            "exist.  If it does, then the shell name and optional first 
argument will be\n"
+            "extracted from the script file.\n\0"
 /*  1452 */ "\n"
             "If the script file already exists and contains Automated Option 
Processing\n"
             "text, the second line of the file through the ending tag will be 
replaced\n"
-            "by the newly generated text.  The first ``#!''  line will be 
regenerated.\n\0"
-/*  1677 */ "genshellopt 1";
+            "by the newly generated text.  The first ``#!'' line will be 
regenerated.\n\0"
+/*  1676 */ "genshellopt 1";
 
 /*
  *  script option description:
@@ -164,9 +165,11 @@ static tOptProc
     doUsageOpt;
 #define VER_PROC        optionPrintVersion
 
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *
- *  Define the Genshellopt Option Descriptions.
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the genshellopt Option Descriptions.
+ * This is an array of GENSHELL_OPTION_CT entries, one for each
+ * option that the genshellopt program responds to.
  */
 static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
   {  /* entry idx, value */ 0, VALUE_GENSHELL_OPT_SCRIPT,
@@ -235,7 +238,7 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  *
- *  Define the Genshellopt Option Environment
+ *  Define the genshellopt Option Environment
  */
 #define zPROGNAME       (genshellopt_opt_strs+1102)
 #define zUsageTitle     (genshellopt_opt_strs+1114)
@@ -244,8 +247,8 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
 #define zBugsAddr       (genshellopt_opt_strs+1235)
 #define zExplain        (genshellopt_opt_strs+1271)
 #define zDetail         (genshellopt_opt_strs+1452)
-#define zFullVersion    (genshellopt_opt_strs+1677)
-/* extracted from optcode.tlib near line 349 */
+#define zFullVersion    (genshellopt_opt_strs+1676)
+/* extracted from optcode.tlib near line 350 */
 
 #if defined(ENABLE_NLS)
 # define OPTPROC_BASE OPTPROC_TRANSLATE
@@ -260,27 +263,39 @@ static tOptDesc optDesc[GENSHELL_OPTION_CT] = {
 
 #define genshellopt_short_usage (NULL)
 
+#endif /* not defined __doxygen__ */
+
 /*
  *  Create the static procedure(s) declared above.
  */
 /**
- * The callout function that invokes the GENSHELL_USAGE() macro.
+ * The callout function that invokes the genshelloptUsage function.
  *
  * @param pOptions the AutoOpts option description structure
  * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
  */
 static void
 doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
 {
+    genshelloptUsage(&genshelloptOptions, GENSHELLOPT_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
     (void)pOptions;
-    GENSHELL_USAGE(GENSHELLOPT_EXIT_SUCCESS);
 }
-/* extracted from optmain.tlib near line 1093 */
+/* extracted from optmain.tlib near line 1113 */
 
+/**
+ * The directory containing the data associated with genshellopt.
+ */
 #ifndef  PKGDATADIR
 # define PKGDATADIR ""
 #endif
 
+/**
+ * Information about the person or institution that packaged genshellopt
+ * for the current distribution.
+ */
 #ifndef  WITH_PACKAGER
 # define genshellopt_packager_info NULL
 #else
@@ -296,7 +311,13 @@ static char const genshellopt_packager_info[] =
 # endif
     "\n";
 #endif
+#ifndef __doxygen__
 
+#endif /* __doxygen__ */
+/**
+ * The option definitions for genshellopt.  The one structure that
+ * binds them all.
+ */
 tOptions genshelloptOptions = {
     OPTIONS_STRUCT_VERSION,
     0, NULL,                    /* original argc + argv    */
@@ -340,7 +361,16 @@ tOptions genshelloptOptions = {
 static char* AO_gettext(char const* pz);
 static void  coerce_it(void** s);
 
-static char*
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
 AO_gettext(char const* pz)
 {
     char* pzRes;
@@ -360,8 +390,9 @@ AO_gettext(char const* pz)
 static void coerce_it(void** s) { *s = AO_gettext(*s);
 }
 
-/*
- *  This invokes the translation code (e.g. gettext(3)).
+/**
+ * Translate all the translatable strings in the genshelloptOptions
+ * structure defined above.  This is done only once.
  */
 static void
 translate_option_strings(void)
diff --git a/src/libopts/genshell.h b/src/libopts/genshell.h
index 1115d8f..d91c069 100644
--- a/src/libopts/genshell.h
+++ b/src/libopts/genshell.h
@@ -2,11 +2,11 @@
  *  
  *  DO NOT EDIT THIS FILE   (genshell.h)
  *  
- *  It has been AutoGen-ed  February 26, 2012 at 11:08:41 AM by AutoGen 
5.15pre14
+ *  It has been AutoGen-ed  May  6, 2012 at 04:20:59 PM by AutoGen 5.16pre36
  *  From the definitions    genshell.def
  *  and the template file   options
  *
- * Generated from AutoOpts 36:3:11 templates.
+ * Generated from AutoOpts 36:4:11 templates.
  *
  *  AutoOpts is a copyrighted work.  This header file is not encumbered
  *  by AutoOpts licensing, but is provided under the licensing terms chosen
@@ -55,7 +55,7 @@
  *  tolerable version is at least as old as what was current when the header
  *  template was released.
  */
-#define AO_TEMPLATE_VERSION 147459
+#define AO_TEMPLATE_VERSION 147460
 #if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
  || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
 # error option template version mismatches autoopts/options.h header
@@ -104,7 +104,8 @@ typedef enum {
  */
 typedef enum {
     GENSHELLOPT_EXIT_SUCCESS = 0,
-    GENSHELLOPT_EXIT_FAILURE = 1
+    GENSHELLOPT_EXIT_FAILURE = 1,
+    GENSHELLOPT_EXIT_LIBOPTS_FAILURE = 70
 } genshellopt_exit_code_t;
 /* * * * * *
  *
@@ -125,7 +126,7 @@ typedef enum {
                 genshelloptOptions.pzCurOpt  = NULL )
 #define START_GENSHELL_OPT       RESTART_GENSHELL_OPT(1)
 #define GENSHELL_USAGE(c)        
(*genshelloptOptions.pUsageProc)(&genshelloptOptions, c)
-/* extracted from opthead.tlib near line 469 */
+/* extracted from opthead.tlib near line 484 */
 
 #ifdef  __cplusplus
 extern "C" {
@@ -140,9 +141,6 @@ extern tOptions genshelloptOptions;
 
 #if defined(ENABLE_NLS)
 # ifndef _
-#   if defined(HAVE_GETTEXT)
-#     include <libintl.h>
-#   endif
 #   include <stdio.h>
 static inline char* aoGetsText(char const* pz) {
     if (pz == NULL) return NULL;
diff --git a/src/libopts/libopts.c b/src/libopts/libopts.c
index bd5f872..07cc035 100644
--- a/src/libopts/libopts.c
+++ b/src/libopts/libopts.c
@@ -1,6 +1,5 @@
-#include "autoopts/project.h"
 #define  AUTOOPTS_INTERNAL 1
-#include "compat/compat.h"
+#include "autoopts/project.h"
 #define  LOCAL static
 #include "ao-strs.h"
 #include "autoopts/options.h"
@@ -11,7 +10,6 @@
 #include "ao-strs.h"
 #include "ag-char-map.h"
 #include "autoopts.h"
-#include "parse-duration.h"
 #include "proto.h"
 #include "parse-duration.c"
 #include "ao-strs.c"
diff --git a/src/libopts/load.c b/src/libopts/load.c
index a138070..1ea7808 100644
--- a/src/libopts/load.c
+++ b/src/libopts/load.c
@@ -1,7 +1,7 @@
 
 /**
  *  \file load.c
- *  Time-stamp:      "2012-01-29 19:37:15 bkorb"
+ *  Time-stamp:      "2012-03-31 13:13:34 bkorb"
  *
  *  This file contains the routines that deal with processing text strings
  *  for options, either from a NUL-terminated string passed in or from an
@@ -29,13 +29,12 @@
  */
 
 /* = = = START-STATIC-FORWARD = = = */
-static ag_bool
+static bool
 add_prog_path(char * pzBuf, int bufSize, char const * pzName,
               char const * pzProgPath);
 
-static ag_bool
-add_env_val(char * pzBuf, int bufSize, char const * pzName,
-            char const * pzProgPath);
+static bool
+add_env_val(char * pzBuf, int bufSize, char const * pzName);
 
 static char *
 assemble_arg_val(char * pzTxt, tOptionLoadMode mode);
@@ -50,8 +49,8 @@ assemble_arg_val(char * pzTxt, tOptionLoadMode mode);
  * arg:   + char const* + pzName     + The input name +
  * arg:   + char const* + pzProgPath + The full path of the current program +
  *
- * ret-type: ag_bool
- * ret-desc: AG_TRUE if the name was handled, otherwise AG_FALSE.
+ * ret-type: bool
+ * ret-desc: true if the name was handled, otherwise false.
  *           If the name does not start with ``$'', then it is handled
  *           simply by copying the input name to the output buffer and
  *           resolving the name with either
@@ -77,7 +76,7 @@ assemble_arg_val(char * pzTxt, tOptionLoadMode mode);
  *     @code{pzName} string and must either be the entire string or be followed
  *     by the @code{'/'} (backslash on windows) character.
  *
- * err:  @code{AG_FALSE} is returned if:
+ * err:  @code{false} is returned if:
  *       @*
  *       @bullet{} The input name exceeds @code{bufSize} bytes.
  *       @*
@@ -92,14 +91,14 @@ assemble_arg_val(char * pzTxt, tOptionLoadMode mode);
  *       @bullet{} @code{canonicalize_file_name} or @code{realpath} return
  *                 errors (cannot resolve the resulting path).
 =*/
-ag_bool
+bool
 optionMakePath(char * pzBuf, int bufSize, char const * pzName,
                char const * pzProgPath)
 {
     size_t name_len = strlen(pzName);
 
     if (((size_t)bufSize <= name_len) || (name_len == 0))
-        return AG_FALSE;
+        return false;
 
     /*
      *  IF not an environment variable, just copy the data
@@ -113,7 +112,7 @@ optionMakePath(char * pzBuf, int bufSize, char const * 
pzName,
             if ( (*(pzD++) = *(pzS++)) == NUL)
                 break;
             if (--ct <= 0)
-                return AG_FALSE;
+                return false;
         }
     }
 
@@ -124,37 +123,37 @@ optionMakePath(char * pzBuf, int bufSize, char const * 
pzName,
      */
     else switch (pzName[1]) {
     case NUL:
-        return AG_FALSE;
+        return false;
 
     case '$':
         if (! add_prog_path(pzBuf, bufSize, pzName, pzProgPath))
-            return AG_FALSE;
+            return false;
         break;
 
     case '@':
         if (program_pkgdatadir[0] == NUL)
-            return AG_FALSE;
+            return false;
 
         if (snprintf(pzBuf, bufSize, "%s%s", program_pkgdatadir, pzName + 2)
             >= bufSize)
-            return AG_FALSE;
+            return false;
         break;
 
     default:
-        if (! add_env_val(pzBuf, bufSize, pzName, pzProgPath))
-            return AG_FALSE;
+        if (! add_env_val(pzBuf, bufSize, pzName))
+            return false;
     }
 
 #if defined(HAVE_CANONICALIZE_FILE_NAME)
     {
         char * pz = canonicalize_file_name(pzBuf);
         if (pz == NULL)
-            return AG_FALSE;
+            return false;
 
         name_len = strlen(pz);
-        if (name_len >= bufSize) {
+        if (name_len >= (size_t)bufSize) {
             free(pz);
-            return AG_FALSE;
+            return false;
         }
 
         memcpy(pzBuf, pz, name_len + 1);
@@ -166,20 +165,20 @@ optionMakePath(char * pzBuf, int bufSize, char const * 
pzName,
         char z[PATH_MAX+1];
 
         if (realpath(pzBuf, z) == NULL)
-            return AG_FALSE;
+            return false;
 
         name_len = strlen(z);
         if (name_len >= bufSize)
-            return AG_FALSE;
+            return false;
 
         memcpy(pzBuf, z, name_len + 1);
     }
 #endif
 
-    return AG_TRUE;
+    return true;
 }
 
-static ag_bool
+static bool
 add_prog_path(char * pzBuf, int bufSize, char const * pzName,
               char const * pzProgPath)
 {
@@ -193,7 +192,7 @@ add_prog_path(char * pzBuf, int bufSize, char const * 
pzName,
     case NUL:
         break;
     default:
-        return AG_FALSE;
+        return false;
     }
 
     /*
@@ -207,7 +206,7 @@ add_prog_path(char * pzBuf, int bufSize, char const * 
pzName,
         pzPath = pathfind(getenv("PATH"), (char*)pzProgPath, "rx");
 
         if (pzPath == NULL)
-            return AG_FALSE;
+            return false;
     }
 
     pz = strrchr(pzPath, DIRCH);
@@ -217,7 +216,7 @@ add_prog_path(char * pzBuf, int bufSize, char const * 
pzName,
      *  THEN we do not have a path name to our executable file.
      */
     if (pz == NULL)
-        return AG_FALSE;
+        return false;
 
     pzName += skip;
 
@@ -226,7 +225,7 @@ add_prog_path(char * pzBuf, int bufSize, char const * 
pzName,
      *  The result may be either a file or a directory.
      */
     if ((pz - pzPath)+1 + strlen(pzName) >= (unsigned)bufSize)
-        return AG_FALSE;
+        return false;
 
     memcpy(pzBuf, pzPath, (size_t)((pz - pzPath)+1));
     strcpy(pzBuf + (pz - pzPath) + 1, pzName);
@@ -237,15 +236,14 @@ add_prog_path(char * pzBuf, int bufSize, char const * 
pzName,
      */
     if (pzPath != pzProgPath)
         AGFREE(pzPath);
-    return AG_TRUE;
+    return true;
 }
 
 
-static ag_bool
-add_env_val(char * pzBuf, int bufSize, char const * pzName,
-            char const * pzProgPath)
+static bool
+add_env_val(char * pzBuf, int bufSize, char const * pzName)
 {
-    char* pzDir = pzBuf;
+    char * pzDir = pzBuf;
 
     for (;;) {
         int ch = (int)*++pzName;
@@ -255,7 +253,7 @@ add_env_val(char * pzBuf, int bufSize, char const * pzName,
     }
 
     if (pzDir == pzBuf)
-        return AG_FALSE;
+        return false;
 
     *pzDir = NUL;
 
@@ -265,34 +263,34 @@ add_env_val(char * pzBuf, int bufSize, char const * 
pzName,
      *  Environment value not found -- skip the home list entry
      */
     if (pzDir == NULL)
-        return AG_FALSE;
+        return false;
 
     if (strlen(pzDir) + 1 + strlen(pzName) >= (unsigned)bufSize)
-        return AG_FALSE;
+        return false;
 
     sprintf(pzBuf, "%s%s", pzDir, pzName);
-    return AG_TRUE;
+    return true;
 }
 
 
 LOCAL void
 mungeString(char* pzTxt, tOptionLoadMode mode)
 {
-    char* pzE;
+    char * pzE;
 
     if (mode == OPTION_LOAD_KEEP)
         return;
 
     if (IS_WHITESPACE_CHAR(*pzTxt)) {
-        char* pzS = pzTxt;
-        char* pzD = pzTxt;
-        while (IS_WHITESPACE_CHAR(*++pzS))  ;
-        while ((*(pzD++) = *(pzS++)) != NUL)   ;
-        pzE = pzD-1;
+        char * pzS = SPN_WHITESPACE_CHARS(pzTxt+1);
+        size_t l   = strlen(pzS) + 1;
+        memmove(pzTxt, pzS, l);
+        pzE = pzTxt + l - 1;
+
     } else
         pzE = pzTxt + strlen(pzTxt);
 
-    while ((pzE > pzTxt) && IS_WHITESPACE_CHAR(pzE[-1]))  pzE--;
+    pzE  = SPN_WHITESPACE_BACK(pzTxt, pzE);
     *pzE = NUL;
 
     if (mode == OPTION_LOAD_UNCOOKED)
@@ -343,9 +341,10 @@ assemble_arg_val(char * pzTxt, tOptionLoadMode mode)
      */
     space_break = IS_WHITESPACE_CHAR(*pzEnd);
     *(pzEnd++) = NUL;
-    while (IS_WHITESPACE_CHAR(*pzEnd))  pzEnd++;
+
+    pzEnd = SPN_WHITESPACE_CHARS(pzEnd);
     if (space_break && ((*pzEnd == ':') || (*pzEnd == '=')))
-        while (IS_WHITESPACE_CHAR(*++pzEnd))  ;
+        pzEnd = SPN_WHITESPACE_CHARS(pzEnd+1);
 
     return pzEnd;
 }
@@ -365,7 +364,7 @@ loadOptionLine(
     tDirection  direction,
     tOptionLoadMode   load_mode )
 {
-    while (IS_WHITESPACE_CHAR(*pzLine))  pzLine++;
+    pzLine = SPN_WHITESPACE_CHARS(pzLine);
 
     {
         char* pzArg = assemble_arg_val(pzLine, load_mode);
diff --git a/src/libopts/m4/libopts.m4 b/src/libopts/m4/libopts.m4
index d9a1173..ce083de 100644
--- a/src/libopts/m4/libopts.m4
+++ b/src/libopts/m4/libopts.m4
@@ -2,7 +2,7 @@ dnl  -*- buffer-read-only: t -*- vi: set ro:
 dnl 
 dnl DO NOT EDIT THIS FILE   (libopts.m4)
 dnl 
-dnl It has been AutoGen-ed  February 26, 2012 at 11:08:37 AM by AutoGen 
5.15pre14
+dnl It has been AutoGen-ed  May  6, 2012 at 04:20:55 PM by AutoGen 5.16pre36
 dnl From the definitions    libopts.def
 dnl and the template file   conftest.tpl
 dnl
@@ -16,11 +16,12 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
   # AC_CHECK_HEADERS
   # =================
   AC_CHECK_HEADERS([ \
-      dlfcn.h      errno.h       fcntl.h       libgen.h     \
-      memory.h     netinet/in.h  setjmp.h      sys/mman.h   \
-      sys/param.h  sys/poll.h    sys/procset.h sys/select.h \
-      sys/socket.h sys/stropts.h sys/time.h    sys/un.h     \
-      sys/wait.h   unistd.h      utime.h       sysexits.h ])
+      sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
+      sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
+      sys/un.h      sys/wait.h    dlfcn.h       errno.h \
+      fcntl.h       libgen.h      memory.h      netinet/in.h \
+      setjmp.h      stdbool.h     sysexits.h    unistd.h \
+      utime.h])
   
   AC_CHECK_HEADERS([stdarg.h     varargs.h],
       [lo_have_arg_hdr=true;break],
@@ -100,7 +101,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
   AC_FUNC_VPRINTF
   AC_FUNC_FORK
   AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
-                 strrchr strsignal])
+                 strrchr strsignal fchmod fstat chmod])
   AC_PROG_SED
   [while :
   do
diff --git a/src/libopts/makeshell.c b/src/libopts/makeshell.c
index a2b0a2e..79edb70 100644
--- a/src/libopts/makeshell.c
+++ b/src/libopts/makeshell.c
@@ -2,7 +2,7 @@
 /**
  * \file makeshell.c
  *
- * Time-stamp:      "2012-01-29 19:01:07 bkorb"
+ * Time-stamp:      "2012-04-07 09:03:16 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and create a Bourne shell script capable of parsing them.
@@ -163,11 +163,11 @@ optionParseShell(tOptions * pOpts)
     else if (ENABLED_GENSHELL_OPT(SHELL))
         printf(SHOW_PROG_ENV, pOpts->pzPROGNAME);
 
-    fflush(stdout);
 #ifdef HAVE_FCHMOD
     fchmod(STDOUT_FILENO, 0755);
 #endif
     fclose(stdout);
+
     if (ferror(stdout)) {
         fputs(zOutputFail, stderr);
         exit(EXIT_FAILURE);
@@ -718,7 +718,7 @@ open_out(char const * pzFile)
          */
         script_trailer = pzScan + END_MARK_LEN;
         script_leader  = pzData;
-    } while (AG_FALSE);
+    } while (false);
 
     if (freopen(pzFile, "w" FOPEN_BINARY_FLAG, stdout) != stdout) {
         fprintf(stderr, zFreopenFail, errno, strerror(errno));
diff --git a/src/libopts/nested.c b/src/libopts/nested.c
index b7f1586..ed23fd2 100644
--- a/src/libopts/nested.c
+++ b/src/libopts/nested.c
@@ -2,7 +2,7 @@
 /**
  * \file nested.c
  *
- *  Time-stamp:      "2012-01-29 07:00:04 bkorb"
+ *  Time-stamp:      "2012-03-04 13:30:07 bkorb"
  *
  *   Automated Options Nested Values module.
  *
@@ -397,7 +397,8 @@ scan_name(char const* pzName, tOptionValue* pRes)
 static char const*
 scan_xml(char const* pzName, tOptionValue* pRes)
 {
-    size_t nameLen = 1, valLen = 0;
+    size_t nameLen;
+    size_t valLen;
     char const*   pzScan = ++pzName;
     char const*   pzVal;
     tOptionValue  valu;
@@ -425,8 +426,8 @@ scan_xml(char const* pzName, tOptionValue* pRes)
         return pzName;
     }
 
-    pzScan++;
-    while (IS_VALUE_NAME_CHAR((int)*pzScan))  { pzScan++; nameLen++; }
+    pzScan  = SPN_VALUE_NAME_CHARS(pzName+1);
+    nameLen = pzScan - pzName;
     if (nameLen > 64)
         return NULL;
     valu.valType = OPARG_TYPE_STRING;
@@ -434,7 +435,7 @@ scan_xml(char const* pzName, tOptionValue* pRes)
     switch (*pzScan) {
     case ' ':
     case '\t':
-        pzScan = parseAttributes(
+        pzScan = parse_attrs(
             NULL, (char*)pzScan, &option_load_mode, &valu );
         if (*pzScan == '>') {
             pzScan++;
@@ -489,7 +490,7 @@ scan_xml(char const* pzName, tOptionValue* pRes)
         }
         valLen = (pzScan - pzVal);
         pzScan += nameLen + 3;
-        while (IS_WHITESPACE_CHAR(*pzScan))  pzScan++;
+        pzScan = SPN_WHITESPACE_CHARS(pzScan);
     }
 
     switch (valu.valType) {
diff --git a/src/libopts/parse-duration.c b/src/libopts/parse-duration.c
index e49060a..655a5e5 100644
--- a/src/libopts/parse-duration.c
+++ b/src/libopts/parse-duration.c
@@ -54,14 +54,14 @@ typedef enum {
 #define TIME_MAX        0x7FFFFFFF
 
 /* Wrapper around strtoul that does not require a cast.  */
-static unsigned long inline
+inline static unsigned long
 str_const_to_ul (cch_t * str, cch_t ** ppz, int base)
 {
   return strtoul (str, (char **)ppz, base);
 }
 
 /* Wrapper around strtol that does not require a cast.  */
-static long inline
+inline static long
 str_const_to_l (cch_t * str, cch_t ** ppz, int base)
 {
   return strtol (str, (char **)ppz, base);
@@ -70,7 +70,7 @@ str_const_to_l (cch_t * str, cch_t ** ppz, int base)
 /* Returns BASE + VAL * SCALE, interpreting BASE = BAD_TIME
    with errno set as an error situation, and returning BAD_TIME
    with errno set in an error situation.  */
-static time_t inline
+inline static time_t
 scale_n_add (time_t base, time_t val, int scale)
 {
   if (base == BAD_TIME)
diff --git a/src/libopts/pgusage.c b/src/libopts/pgusage.c
index 4dbbd53..7eae2b0 100644
--- a/src/libopts/pgusage.c
+++ b/src/libopts/pgusage.c
@@ -2,7 +2,7 @@
 /**
  * \file pgusage.c
  *
- * Time-stamp:      "2012-01-29 16:09:14 bkorb"
+ * Time-stamp:      "2012-02-28 19:49:32 bkorb"
  *
  *   Automated Options Paged Usage module.
  *
@@ -43,7 +43,7 @@
  *  This is disabled on platforms without a working fork() function.
 =*/
 void
-optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
+optionPagedUsage(tOptions * pOptions, tOptDesc * pOD)
 {
 #if ! defined(HAVE_WORKING_FORK)
     if ((pOD->fOptState & OPTST_RESET) != 0)
@@ -66,11 +66,7 @@ optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
             return;
 
         my_pid  = getpid();
-#ifdef HAVE_SNPRINTF
         snprintf(zPageUsage, sizeof(zPageUsage), TMP_USAGE_FMT, (tAoUL)my_pid);
-#else
-        sprintf(zPageUsage, TMP_USAGE_FMT, (tAoUL)my_pid);
-#endif
         unlink(zPageUsage);
 
         /*
@@ -110,11 +106,8 @@ optionPagedUsage(tOptions* pOptions, tOptDesc* pOD)
         /*
          *  Page the file and remove it when done.
          */
-#ifdef HAVE_SNPRINTF
-        snprintf(zPageUsage, sizeof(zPageUsage), PAGE_USAGE_FMT, pzPager, 
(tAoUL)my_pid);
-#else
-        sprintf(zPageUsage, PAGE_USAGE_FMT, pzPager, (tAoUL)my_pid);
-#endif
+        snprintf(zPageUsage, sizeof(zPageUsage), PAGE_USAGE_FMT, pzPager,
+                 (tAoUL)my_pid);
         fclose(stderr);
         dup2(STDOUT_FILENO, STDERR_FILENO);
 
diff --git a/src/libopts/proto.h b/src/libopts/proto.h
index 9f4bbff..ae1a110 100644
--- a/src/libopts/proto.h
+++ b/src/libopts/proto.h
@@ -1,7 +1,7 @@
 /* -*- buffer-read-only: t -*- vi: set ro:
  *
  * Prototypes for autoopts
- * Generated Sun Feb 26 11:08:49 PST 2012
+ * Generated Sun May  6 16:21:08 PDT 2012
  */
 #ifndef AUTOOPTS_PROTO_H_GUARD
 #define AUTOOPTS_PROTO_H_GUARD 1
@@ -36,7 +36,7 @@ regular_opts(tOptions * pOpts);
 /*
  *  Extracted from check.c
  */
-LOCAL ag_bool
+LOCAL bool
 is_consistent(tOptions * pOpts);
 
 /*
@@ -46,11 +46,8 @@ LOCAL void
 intern_file_load(tOptions* pOpts);
 
 LOCAL char*
-parseAttributes(
-    tOptions*           pOpts,
-    char*               pzText,
-    tOptionLoadMode*    pMode,
-    tOptionValue*       pType );
+parse_attrs(tOptions * pOpts, char * pzText, tOptionLoadMode * pMode,
+            tOptionValue * pType);
 
 LOCAL tSuccess
 validate_struct(tOptions * pOpts, char const * pzProgram);
diff --git a/src/libopts/putshell.c b/src/libopts/putshell.c
index 2c9dde5..d8e2d91 100644
--- a/src/libopts/putshell.c
+++ b/src/libopts/putshell.c
@@ -2,7 +2,7 @@
 /**
  * \file putshell.c
  *
- * Time-stamp:      "2012-02-12 09:14:49 bkorb"
+ * Time-stamp:      "2012-03-31 13:14:18 bkorb"
  *
  *  This module will interpret the options set in the tOptions
  *  structure and print them to standard out in a fashion that
@@ -142,7 +142,7 @@ print_membership(tOptions * pOpts, tOptDesc * pOD)
     pz = pOD->optArg.argString + 7;
     while (*pz != NUL) {
         printf("typeset -x -i %s_", pOD->pz_NAME);
-        while (IS_PLUS_N_SPACE_CHAR(*pz))  pz++;
+        pz = SPN_PLUS_N_SPACE_CHARS(pz);
 
         for (;;) {
             int ch = *(pz++);
@@ -182,11 +182,13 @@ print_stacked_arg(tOptions * pOpts, tOptDesc * pOD)
 static void
 print_reordering(tOptions * pOpts)
 {
-    int  optIx;
+    unsigned int optIx;
 
     fputs(set_dash, stdout);
 
-    for (optIx = pOpts->curOptIdx; optIx < pOpts->origArgCt; optIx++) {
+    for (optIx = pOpts->curOptIdx;
+         optIx < pOpts->origArgCt;
+         optIx++) {
 
         char* pzArg = pOpts->origArgVect[ optIx ];
 
diff --git a/src/libopts/reset.c b/src/libopts/reset.c
index 2345d51..b8c5b9e 100644
--- a/src/libopts/reset.c
+++ b/src/libopts/reset.c
@@ -69,7 +69,7 @@ optionResetEverything(tOptions * pOpts)
 void
 optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
 {
-    static ag_bool reset_active = AG_FALSE;
+    static bool reset_active = false;
 
     tOptState opt_state = OPTSTATE_INITIALIZER(DEFINED);
     char const * pzArg = pOD->optArg.argString;
@@ -91,12 +91,12 @@ optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
         assert(0 == 1);
     }
 
-    reset_active = AG_TRUE;
+    reset_active = true;
 
     if (pzArg[1] == NUL) {
         if (*pzArg == '*') {
             optionResetEverything(pOpts);
-            reset_active = AG_FALSE;
+            reset_active = false;
             return;
         }
 
@@ -124,7 +124,7 @@ optionResetOpt( tOptions* pOpts, tOptDesc* pOD )
      *  Finally, clear the reset flag, too.
      */
     optionReset(pOpts, opt_state.pOD);
-    reset_active = AG_FALSE;
+    reset_active = false;
 }
 /*
  * Local Variables:
diff --git a/src/libopts/save.c b/src/libopts/save.c
index a1357ff..9e95056 100644
--- a/src/libopts/save.c
+++ b/src/libopts/save.c
@@ -2,7 +2,7 @@
 /*
  * \file save.c
  *
- * Time-stamp:      "2012-01-29 19:30:39 bkorb"
+ * Time-stamp:      "2012-03-31 13:15:19 bkorb"
  *
  *  This module's routines will take the currently set options and
  *  store them into an ".rc" file for re-interpretation the next
@@ -192,7 +192,7 @@ find_file_name(tOptions * pOpts, int * p_free_name)
             break; /* found directory -- viz.,  "." */
         }
 
-        if ((dirchp - pzDir) >= sizeof(z))
+        if ((size_t)(dirchp - pzDir) >= sizeof(z))
             goto bogus_name;
 
         memcpy(z, pzDir, (size_t)(dirchp - pzDir));
@@ -201,7 +201,7 @@ find_file_name(tOptions * pOpts, int * p_free_name)
         if ((stat(z, &stBuf) != 0) || ! S_ISDIR(stBuf.st_mode))
             goto bogus_name;
         stBuf.st_mode = S_IFREG; /* file within this directory */
-    } while (0);
+    } while (false);
 
     /*
      *  IF what we found was a directory,
diff --git a/src/libopts/stack.c b/src/libopts/stack.c
index bb962f7..094b2a1 100644
--- a/src/libopts/stack.c
+++ b/src/libopts/stack.c
@@ -2,7 +2,7 @@
 /**
  * \file stack.c
  *
- *  Time-stamp:      "2012-01-29 09:42:12 bkorb"
+ *  Time-stamp:      "2012-03-31 13:16:41 bkorb"
  *
  *  This is a special option processing routine that will save the
  *  argument to an option in a FIFO queue.
@@ -43,11 +43,11 @@
  *  Invoked for options that are equivalenced to stacked options.
 =*/
 void
-optionUnstackArg(
-    tOptions*  pOpts,
-    tOptDesc*  pOptDesc )
+optionUnstackArg(tOptions * pOpts, tOptDesc * pOptDesc)
 {
-    tArgList* pAL;
+    tArgList * pAL;
+
+    (void)pOpts;
 
     if ((pOptDesc->fOptState & OPTST_RESET) != 0)
         return;
@@ -230,12 +230,12 @@ addArgListEntry(void** ppAL, void* entry)
  *  Keep an entry-ordered list of option arguments.
 =*/
 void
-optionStackArg(
-    tOptions*  pOpts,
-    tOptDesc*  pOD )
+optionStackArg(tOptions * pOpts, tOptDesc * pOD)
 {
     char * pz;
 
+    (void)pOpts;
+
     if ((pOD->fOptState & OPTST_RESET) != 0) {
         tArgList* pAL = (void*)pOD->optCookie;
         int ix;
diff --git a/src/libopts/streqvcmp.c b/src/libopts/streqvcmp.c
index d08f9c9..54a063a 100644
--- a/src/libopts/streqvcmp.c
+++ b/src/libopts/streqvcmp.c
@@ -2,7 +2,7 @@
 /**
  * \file streqvcmp.c
  *
- * Time-stamp:      "2012-01-29 19:03:24 bkorb"
+ * Time-stamp:      "2012-03-31 13:17:39 bkorb"
  *
  *  String Equivalence Comparison
  *
@@ -192,8 +192,8 @@ streqvmap(char From, char To, int ct)
     }
 
     else {
-        int  chTo   = (int)To   & 0xFF;
-        int  chFrom = (int)From & 0xFF;
+        unsigned int chTo   = (int)To   & 0xFF;
+        unsigned int chFrom = (int)From & 0xFF;
 
         do  {
             charmap[chFrom] = (unsigned char)chTo;
diff --git a/src/libopts/tokenize.c b/src/libopts/tokenize.c
index ca0ad53..9563713 100644
--- a/src/libopts/tokenize.c
+++ b/src/libopts/tokenize.c
@@ -1,6 +1,6 @@
 /*
  *  This file defines the string_tokenize interface
- * Time-stamp:      "2012-01-29 19:02:51 bkorb"
+ * Time-stamp:      "2012-03-04 13:23:50 bkorb"
  *
  *  This file is part of AutoOpts, a companion to AutoGen.
  *  AutoOpts is free software.
@@ -128,7 +128,7 @@ alloc_token_list(char const * str)
      *  Trim leading white space.  Use "ENOENT" and a NULL return to indicate
      *  an empty string was passed.
      */
-    while (IS_WHITESPACE_CHAR(*str))  str++;
+    str = SPN_WHITESPACE_CHARS(str);
     if (*str == NUL)  goto enoent_res;
 
     /*
@@ -137,17 +137,15 @@ alloc_token_list(char const * str)
      *  high and we'll squander the space for a few extra pointers.
      */
     {
-        cc_t* pz = (cc_t*)str;
+        char const * pz = str;
 
         do {
             max_token_ct++;
-            while (! IS_WHITESPACE_CHAR(*++pz))
-                if (*pz == NUL) goto found_nul;
-            while (IS_WHITESPACE_CHAR(*pz))  pz++;
+            pz = BRK_WHITESPACE_CHARS(pz+1);
+            pz = SPN_WHITESPACE_CHARS(pz);
         } while (*pz != NUL);
 
-    found_nul:
-        res = malloc(sizeof(*res) + (pz - (cc_t*)str)
+        res = malloc(sizeof(*res) + (pz - str)
                      + (max_token_ct * sizeof(ch_t*)));
     }
 
@@ -249,7 +247,7 @@ ao_string_tokenize(char const* str)
             int ch = (ch_t)*str;
             if (IS_WHITESPACE_CHAR(ch)) {
             found_white_space:
-                while (IS_WHITESPACE_CHAR(*++str))  ;
+                str = SPN_WHITESPACE_CHARS(str+1);
                 break;
             }
 
diff --git a/src/libopts/usage.c b/src/libopts/usage.c
index 8634cfc..ebdc46a 100644
--- a/src/libopts/usage.c
+++ b/src/libopts/usage.c
@@ -2,7 +2,7 @@
 /*
  * \file usage.c
  *
- * Time-stamp:      "2012-01-29 09:57:43 bkorb"
+ * Time-stamp:      "2012-03-31 19:19:26 bkorb"
  *
  *  This module implements the default usage procedure for
  *  Automated Options.  It may be overridden, of course.
@@ -38,10 +38,10 @@
 #define OPTPROC_L_N_S  (OPTPROC_LONGOPT | OPTPROC_SHORTOPT)
 
 /* = = = START-STATIC-FORWARD = = = */
-static inline ag_bool
+static inline bool
 do_gnu_usage(tOptions * pOpts);
 
-static inline ag_bool
+static inline bool
 skip_misuse_usage(tOptions * pOpts);
 
 static void
@@ -55,14 +55,14 @@ prt_one_vendor(tOptions * pOptions, tOptDesc * pOD,
                arg_types_t * pAT, char const * usefmt);
 
 static void
-prt_vendor_opts(tOptions * pOpts, arg_types_t * pAT, char const * pOptTitle);
+prt_vendor_opts(tOptions * pOpts, char const * pOptTitle);
 
 static void
 prt_extd_usage(tOptions * pOpts, tOptDesc * pOD,
-               arg_types_t * pAT, char const * pOptTitle);
+               char const * pOptTitle);
 
 static void
-prt_ini_list(char const * const * papz, ag_bool * pInitIntro,
+prt_ini_list(char const * const * papz, bool * pInitIntro,
              char const * pzRc, char const * pzPN);
 
 static void
@@ -116,14 +116,14 @@ set_usage_flags(tOptions * opts, char const * flg_txt)
     };
 #   undef  _aof_
 
-    ao_flags_t flg = 0;
+    unsigned int flg = (ao_flags_t)0;
 
     if (flg_txt == NULL) {
         flg_txt = getenv("AUTOOPTS_USAGE");
         if (flg_txt == NULL) return;
     }
 
-    while (IS_WHITESPACE_CHAR(*flg_txt))  flg_txt++;
+    flg_txt = SPN_WHITESPACE_CHARS(flg_txt);
     if (*flg_txt == NUL)
         return;
 
@@ -147,8 +147,7 @@ set_usage_flags(tOptions * opts, char const * flg_txt)
             return;
 
         flg |= 1 << ix;
-        flg_txt  += fnt->fnm_len;
-        while (IS_WHITESPACE_CHAR(*flg_txt))  flg_txt++;
+        flg_txt = SPN_WHITESPACE_CHARS(flg_txt + fnt->fnm_len);
 
         if (*flg_txt == NUL)
             break;
@@ -157,7 +156,7 @@ set_usage_flags(tOptions * opts, char const * flg_txt)
             /*
              *  skip the comma and following white space
              */
-            while (IS_WHITESPACE_CHAR(*++flg_txt))  ;
+            flg_txt = SPN_WHITESPACE_CHARS(flg_txt + 1);
             if (*flg_txt == NUL)
                 break;
         }
@@ -182,20 +181,20 @@ set_usage_flags(tOptions * opts, char const * flg_txt)
  *  Figure out if we should try to format usage text sort-of like
  *  the way many GNU programs do.
  */
-static inline ag_bool
+static inline bool
 do_gnu_usage(tOptions * pOpts)
 {
-    return (pOpts->fOptSet & OPTPROC_GNUUSAGE) ? AG_TRUE : AG_FALSE;
+    return (pOpts->fOptSet & OPTPROC_GNUUSAGE) ? true : false;
 }
 
 /*
  *  Figure out if we should try to format usage text sort-of like
  *  the way many GNU programs do.
  */
-static inline ag_bool
+static inline bool
 skip_misuse_usage(tOptions * pOpts)
 {
-    return (pOpts->fOptSet & OPTPROC_MISUSE) ? AG_TRUE : AG_FALSE;
+    return (pOpts->fOptSet & OPTPROC_MISUSE) ? true : false;
 }
 
 
@@ -326,16 +325,16 @@ print_usage_details(tOptions * opts, int exit_code)
  *  over-ride this, providing the value of it is set to either "gnu" or
  *  "autoopts".  This routine will @strong{not} return.
  *
- *  If "exitCode" is "EX_USAGE" (normally 64), then output will to to stdout
- *  and the actual exit code will be "EXIT_SUCCESS".
+ *  If "exitCode" is "AO_EXIT_REQ_USAGE" (normally 64), then output will to
+ *  to stdout and the actual exit code will be "EXIT_SUCCESS".
 =*/
 void
 optionUsage(tOptions * pOptions, int usage_exit_code)
 {
-    int exit_code =
-        (usage_exit_code == EX_USAGE) ? EXIT_SUCCESS : usage_exit_code;
+    int exit_code = (usage_exit_code == AO_EXIT_REQ_USAGE)
+        ? EXIT_SUCCESS : usage_exit_code;
 
-    displayEnum = AG_FALSE;
+    displayEnum = false;
 
     /*
      *  Paged usage will preset option_usage_fp to an output file.
@@ -467,7 +466,7 @@ prt_one_vendor(tOptions * pOptions, tOptDesc * pOD,
         default:                     goto bogus_desc;
         }
 
-        while (IS_WHITESPACE_CHAR(*pzArgType))  pzArgType++;
+        pzArgType = SPN_WHITESPACE_CHARS(pzArgType);
         if (*pzArgType == NUL)
             snprintf(z, sizeof(z), "%s", pOD->pz_Name);
         else
@@ -477,7 +476,7 @@ prt_one_vendor(tOptions * pOptions, tOptDesc * pOD,
         switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
         case OPARG_TYPE_ENUMERATION:
         case OPARG_TYPE_MEMBERSHIP:
-            displayEnum = (pOD->pOptProc != NULL) ? AG_TRUE : displayEnum;
+            displayEnum = (pOD->pOptProc != NULL) ? true : displayEnum;
         }
     }
 
@@ -494,10 +493,9 @@ bogus_desc:
  *
  * @param pOptions the program option descriptor
  * @param pOD      the option descriptor
- * @param pAT      names of the option argument types
  */
 static void
-prt_vendor_opts(tOptions * pOpts, arg_types_t * pAT, char const * pOptTitle)
+prt_vendor_opts(tOptions * pOpts, char const * pOptTitle)
 {
     static unsigned int const not_vended_mask =
         OPTST_NO_USAGE_MASK | OPTST_DOCUMENT;
@@ -535,7 +533,7 @@ prt_vendor_opts(tOptions * pOpts, arg_types_t * pAT, char 
const * pOptTitle)
             continue;
 
         prt_one_vendor(pOpts, pOD, &argTypes, vfmt);
-        prt_extd_usage(pOpts, pOD, &argTypes, pOptTitle);
+        prt_extd_usage(pOpts, pOD, pOptTitle);
 
     } while (pOD++, (--ct > 0));
 }
@@ -549,11 +547,11 @@ prt_vendor_opts(tOptions * pOpts, arg_types_t * pAT, char 
const * pOptTitle)
  */
 static void
 prt_extd_usage(tOptions * pOpts, tOptDesc * pOD,
-               arg_types_t * pAT, char const * pOptTitle)
+               char const * pOptTitle)
 {
     if (  ((pOpts->fOptSet & OPTPROC_VENDOR_OPT) != 0)
        && (pOD->optActualValue == VENDOR_OPTION_VALUE)) {
-        prt_vendor_opts(pOpts, pAT, pOptTitle);
+        prt_vendor_opts(pOpts, pOptTitle);
         return;
     }
 
@@ -666,7 +664,7 @@ prt_extd_usage(tOptions * pOpts, tOptDesc * pOD,
  *   squishy, but important to tell users how to find these files.
  */
 static void
-prt_ini_list(char const * const * papz, ag_bool * pInitIntro,
+prt_ini_list(char const * const * papz, bool * pInitIntro,
              char const * pzRc, char const * pzPN)
 {
     char zPath[AG_PATH_MAX+1];
@@ -675,7 +673,7 @@ prt_ini_list(char const * const * papz, ag_bool * 
pInitIntro,
         return;
 
     fputs(zPresetIntro, option_usage_fp);
-    *pInitIntro = AG_FALSE;
+    *pInitIntro = false;
 
     for (;;) {
         char const * pzPath = *(papz++);
@@ -792,7 +790,7 @@ prt_one_usage(tOptions * pOptions, tOptDesc * pOD, 
arg_types_t * pAT)
         switch (OPTST_GET_ARGTYPE(pOD->fOptState)) {
         case OPARG_TYPE_ENUMERATION:
         case OPARG_TYPE_MEMBERSHIP:
-            displayEnum = (pOD->pOptProc != NULL) ? AG_TRUE : displayEnum;
+            displayEnum = (pOD->pOptProc != NULL) ? true : displayEnum;
         }
     }
 
@@ -880,7 +878,7 @@ prt_opt_usage(tOptions * pOpts, int ex_code, char const * 
pOptTitle)
          *  THEN print all the extra info
          */
         if (ex_code == EXIT_SUCCESS)
-            prt_extd_usage(pOpts, pOD, &argTypes, pOptTitle);
+            prt_extd_usage(pOpts, pOD, pOptTitle);
 
     } while (pOD++, optNo++, (--ct > 0));
 
@@ -895,7 +893,7 @@ prt_opt_usage(tOptions * pOpts, int ex_code, char const * 
pOptTitle)
 static void
 prt_prog_detail(tOptions* pOptions)
 {
-    ag_bool  initIntro = AG_TRUE;
+    bool  initIntro = true;
 
     /*
      *  Display all the places we look for config files
diff --git a/src/libopts/value-type.h b/src/libopts/value-type.h
index bc5fc26..d91b0fe 100644
--- a/src/libopts/value-type.h
+++ b/src/libopts/value-type.h
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Sun Feb 26 11:08:41 PST 2012
+ *  Generated header for gperf generated source Sun May  6 16:20:59 PDT 2012
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
diff --git a/src/libopts/xat-attribute.h b/src/libopts/xat-attribute.h
index 527cac2..e12bd4a 100644
--- a/src/libopts/xat-attribute.h
+++ b/src/libopts/xat-attribute.h
@@ -1,5 +1,5 @@
 /*
- *  Generated header for gperf generated source Sun Feb 26 11:08:41 PST 2012
+ *  Generated header for gperf generated source Sun May  6 16:20:59 PDT 2012
  *  This file enumerates the list of names and declares the
  *  procedure for mapping string names to the enum value.
  */
diff --git a/src/ocsptool-args.c b/src/ocsptool-args.c
new file mode 100644
index 0000000..99860e3
--- /dev/null
+++ b/src/ocsptool-args.c
@@ -0,0 +1,1003 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (ocsptool-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:44 PM by AutoGen 5.16
+ *  From the definitions    ocsptool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the ocsptool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The ocsptool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  ocsptool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  ocsptool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "ocsptool-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (ocsptool_opt_strs+0)
+#define zLicenseDescrip (ocsptool_opt_strs+279)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  ocsptool option static const strings
+ */
+static char const ocsptool_opt_strs[2273] =
+/*     0 */ "ocsptool @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   279 */ "ocsptool is free software: you can redistribute it and/or modify 
it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "ocsptool is distributed in the hope that it will be useful, but 
WITHOUT ANY\n"
+            "WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS\n"
+            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more\n"
+            "details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   884 */ "Enable debugging.\0"
+/*   902 */ "DEBUG\0"
+/*   908 */ "debug\0"
+/*   914 */ "More verbose output\0"
+/*   934 */ "VERBOSE\0"
+/*   942 */ "verbose\0"
+/*   950 */ "Input file\0"
+/*   961 */ "INFILE\0"
+/*   968 */ "infile\0"
+/*   975 */ "Output file\0"
+/*   987 */ "OUTFILE\0"
+/*   995 */ "outfile\0"
+/*  1003 */ "Ask an OCSP/HTTP server on a certificate validity\0"
+/*  1053 */ "ASK\0"
+/*  1057 */ "ask\0"
+/*  1061 */ "Verify response\0"
+/*  1077 */ "VERIFY_RESPONSE\0"
+/*  1093 */ "verify-response\0"
+/*  1109 */ "Print information on a OCSP request\0"
+/*  1145 */ "REQUEST_INFO\0"
+/*  1158 */ "request-info\0"
+/*  1171 */ "Print information on a OCSP response\0"
+/*  1208 */ "RESPONSE_INFO\0"
+/*  1222 */ "response-info\0"
+/*  1236 */ "Generate an OCSP request\0"
+/*  1261 */ "GENERATE_REQUEST\0"
+/*  1278 */ "generate-request\0"
+/*  1295 */ "Don't add nonce to OCSP request\0"
+/*  1327 */ "NONCE\0"
+/*  1333 */ "no-nonce\0"
+/*  1342 */ "no\0"
+/*  1345 */ "Read issuer certificate from file\0"
+/*  1379 */ "LOAD_ISSUER\0"
+/*  1391 */ "load-issuer\0"
+/*  1403 */ "Read certificate to check from file\0"
+/*  1439 */ "LOAD_CERT\0"
+/*  1449 */ "load-cert\0"
+/*  1459 */ "Read OCSP trust anchors from file\0"
+/*  1493 */ "LOAD_TRUST\0"
+/*  1504 */ "load-trust\0"
+/*  1515 */ "Read OCSP response signer from file\0"
+/*  1551 */ "LOAD_SIGNER\0"
+/*  1563 */ "load-signer\0"
+/*  1575 */ "Use DER format for input certificates and private keys\0"
+/*  1630 */ "INDER\0"
+/*  1636 */ "no-inder\0"
+/*  1645 */ "Read DER encoded OCSP request from file\0"
+/*  1685 */ "LOAD_REQUEST\0"
+/*  1698 */ "load-request\0"
+/*  1711 */ "Read DER encoded OCSP response from file\0"
+/*  1752 */ "LOAD_RESPONSE\0"
+/*  1766 */ "load-response\0"
+/*  1780 */ "Display extended usage information and exit\0"
+/*  1824 */ "help\0"
+/*  1829 */ "Extended usage information passed thru pager\0"
+/*  1874 */ "more-help\0"
+/*  1884 */ "Output version information and exit\0"
+/*  1920 */ "version\0"
+/*  1928 */ "OCSPTOOL\0"
+/*  1937 */ "ocsptool - GnuTLS OCSP tool - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/*  2040 */ "address@hidden"
+/*  2059 */ "\n\n\0"
+/*  2062 */ "\n"
+            "Ocsptool is a program that can parse and print information about 
OCSP\n"
+            "requests/responses, generate requests and verify responses.\n\0"
+/*  2194 */ "ocsptool @address@hidden"
+/*  2213 */ "ocsptool [options]\n"
+            "ocsptool --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (ocsptool_opt_strs+884)
+#define DEBUG_NAME      (ocsptool_opt_strs+902)
+#define DEBUG_name      (ocsptool_opt_strs+908)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  verbose option description:
+ */
+#define VERBOSE_DESC      (ocsptool_opt_strs+914)
+#define VERBOSE_NAME      (ocsptool_opt_strs+934)
+#define VERBOSE_name      (ocsptool_opt_strs+942)
+#define VERBOSE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  infile option description:
+ */
+#define INFILE_DESC      (ocsptool_opt_strs+950)
+#define INFILE_NAME      (ocsptool_opt_strs+961)
+#define INFILE_name      (ocsptool_opt_strs+968)
+#define INFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  outfile option description:
+ */
+#define OUTFILE_DESC      (ocsptool_opt_strs+975)
+#define OUTFILE_NAME      (ocsptool_opt_strs+987)
+#define OUTFILE_name      (ocsptool_opt_strs+995)
+#define OUTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  ask option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define ASK_DESC      (ocsptool_opt_strs+1003)
+#define ASK_NAME      (ocsptool_opt_strs+1053)
+#define ASK_name      (ocsptool_opt_strs+1057)
+static int const aAskMustList[] = {
+    INDEX_OPT_LOAD_CERT,
+    INDEX_OPT_LOAD_ISSUER, NO_EQUIVALENT };
+#define ASK_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | OPTST_ARG_OPTIONAL)
+
+/*
+ *  verify-response option description:
+ */
+#define VERIFY_RESPONSE_DESC      (ocsptool_opt_strs+1061)
+#define VERIFY_RESPONSE_NAME      (ocsptool_opt_strs+1077)
+#define VERIFY_RESPONSE_name      (ocsptool_opt_strs+1093)
+#define VERIFY_RESPONSE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  request-info option description:
+ */
+#define REQUEST_INFO_DESC      (ocsptool_opt_strs+1109)
+#define REQUEST_INFO_NAME      (ocsptool_opt_strs+1145)
+#define REQUEST_INFO_name      (ocsptool_opt_strs+1158)
+#define REQUEST_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  response-info option description:
+ */
+#define RESPONSE_INFO_DESC      (ocsptool_opt_strs+1171)
+#define RESPONSE_INFO_NAME      (ocsptool_opt_strs+1208)
+#define RESPONSE_INFO_name      (ocsptool_opt_strs+1222)
+#define RESPONSE_INFO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-request option description:
+ */
+#define GENERATE_REQUEST_DESC      (ocsptool_opt_strs+1236)
+#define GENERATE_REQUEST_NAME      (ocsptool_opt_strs+1261)
+#define GENERATE_REQUEST_name      (ocsptool_opt_strs+1278)
+#define GENERATE_REQUEST_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  nonce option description:
+ */
+#define NONCE_DESC      (ocsptool_opt_strs+1295)
+#define NONCE_NAME      (ocsptool_opt_strs+1327)
+#define NOT_NONCE_name  (ocsptool_opt_strs+1333)
+#define NOT_NONCE_PFX   (ocsptool_opt_strs+1342)
+#define NONCE_name      (NOT_NONCE_name + 3)
+#define NONCE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  load-issuer option description:
+ */
+#define LOAD_ISSUER_DESC      (ocsptool_opt_strs+1345)
+#define LOAD_ISSUER_NAME      (ocsptool_opt_strs+1379)
+#define LOAD_ISSUER_name      (ocsptool_opt_strs+1391)
+#define LOAD_ISSUER_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-cert option description:
+ */
+#define LOAD_CERT_DESC      (ocsptool_opt_strs+1403)
+#define LOAD_CERT_NAME      (ocsptool_opt_strs+1439)
+#define LOAD_CERT_name      (ocsptool_opt_strs+1449)
+#define LOAD_CERT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-trust option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define LOAD_TRUST_DESC      (ocsptool_opt_strs+1459)
+#define LOAD_TRUST_NAME      (ocsptool_opt_strs+1493)
+#define LOAD_TRUST_name      (ocsptool_opt_strs+1504)
+static int const aLoad_TrustCantList[] = {
+    INDEX_OPT_LOAD_SIGNER, NO_EQUIVALENT };
+#define LOAD_TRUST_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-signer option description with
+ *  "Must also have options" and "Incompatible options":
+ */
+#define LOAD_SIGNER_DESC      (ocsptool_opt_strs+1515)
+#define LOAD_SIGNER_NAME      (ocsptool_opt_strs+1551)
+#define LOAD_SIGNER_name      (ocsptool_opt_strs+1563)
+static int const aLoad_SignerCantList[] = {
+    INDEX_OPT_LOAD_TRUST, NO_EQUIVALENT };
+#define LOAD_SIGNER_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  inder option description:
+ */
+#define INDER_DESC      (ocsptool_opt_strs+1575)
+#define INDER_NAME      (ocsptool_opt_strs+1630)
+#define NOT_INDER_name  (ocsptool_opt_strs+1636)
+#define NOT_INDER_PFX   (ocsptool_opt_strs+1342)
+#define INDER_name      (NOT_INDER_name + 3)
+#define INDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  load-request option description:
+ */
+#define LOAD_REQUEST_DESC      (ocsptool_opt_strs+1645)
+#define LOAD_REQUEST_NAME      (ocsptool_opt_strs+1685)
+#define LOAD_REQUEST_name      (ocsptool_opt_strs+1698)
+#define LOAD_REQUEST_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-response option description:
+ */
+#define LOAD_RESPONSE_DESC      (ocsptool_opt_strs+1711)
+#define LOAD_RESPONSE_NAME      (ocsptool_opt_strs+1752)
+#define LOAD_RESPONSE_name      (ocsptool_opt_strs+1766)
+#define LOAD_RESPONSE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (ocsptool_opt_strs+1780)
+#define HELP_name       (ocsptool_opt_strs+1824)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (ocsptool_opt_strs+1829)
+#define MORE_HELP_name  (ocsptool_opt_strs+1874)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (ocsptool_opt_strs+1884)
+#define VER_name        (ocsptool_opt_strs+1920)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug,         doOptInfile,        doOptLoad_Cert,
+    doOptLoad_Issuer,   doOptLoad_Request,  doOptLoad_Response,
+    doOptLoad_Signer,   doOptLoad_Trust,    doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the ocsptool Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the ocsptool program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equiv idx, value */ 1, VALUE_OPT_VERBOSE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, NOLIMIT, 0,
+     /* opt state flags  */ VERBOSE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verbose */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERBOSE_DESC, VERBOSE_NAME, VERBOSE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_INFILE,
+     /* equiv idx, value */ 2, VALUE_OPT_INFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --infile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptInfile,
+     /* desc, NAME, name */ INFILE_DESC, INFILE_NAME, INFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_OUTFILE,
+     /* equiv idx, value */ 3, VALUE_OPT_OUTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OUTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --outfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_ASK,
+     /* equiv idx, value */ 4, VALUE_OPT_ASK,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ ASK_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --ask */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ aAskMustList, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ ASK_DESC, ASK_NAME, ASK_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_VERIFY_RESPONSE,
+     /* equiv idx, value */ 5, VALUE_OPT_VERIFY_RESPONSE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VERIFY_RESPONSE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verify-response */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERIFY_RESPONSE_DESC, VERIFY_RESPONSE_NAME, 
VERIFY_RESPONSE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_REQUEST_INFO,
+     /* equiv idx, value */ 6, VALUE_OPT_REQUEST_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ REQUEST_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --request-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ REQUEST_INFO_DESC, REQUEST_INFO_NAME, 
REQUEST_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_RESPONSE_INFO,
+     /* equiv idx, value */ 7, VALUE_OPT_RESPONSE_INFO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ RESPONSE_INFO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --response-info */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ RESPONSE_INFO_DESC, RESPONSE_INFO_NAME, 
RESPONSE_INFO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_GENERATE_REQUEST,
+     /* equiv idx, value */ 8, VALUE_OPT_GENERATE_REQUEST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_REQUEST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-request */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_REQUEST_DESC, GENERATE_REQUEST_NAME, 
GENERATE_REQUEST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 9, VALUE_OPT_NONCE,
+     /* equiv idx, value */ 9, VALUE_OPT_NONCE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ NONCE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --nonce */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ NONCE_DESC, NONCE_NAME, NONCE_name,
+     /* disablement strs */ NOT_NONCE_name, NOT_NONCE_PFX },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_LOAD_ISSUER,
+     /* equiv idx, value */ 10, VALUE_OPT_LOAD_ISSUER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_ISSUER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-issuer */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Issuer,
+     /* desc, NAME, name */ LOAD_ISSUER_DESC, LOAD_ISSUER_NAME, 
LOAD_ISSUER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_LOAD_CERT,
+     /* equiv idx, value */ 11, VALUE_OPT_LOAD_CERT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_CERT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-cert */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Cert,
+     /* desc, NAME, name */ LOAD_CERT_DESC, LOAD_CERT_NAME, LOAD_CERT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 12, VALUE_OPT_LOAD_TRUST,
+     /* equiv idx, value */ 12, VALUE_OPT_LOAD_TRUST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_TRUST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-trust */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, aLoad_TrustCantList,
+     /* option proc      */ doOptLoad_Trust,
+     /* desc, NAME, name */ LOAD_TRUST_DESC, LOAD_TRUST_NAME, LOAD_TRUST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 13, VALUE_OPT_LOAD_SIGNER,
+     /* equiv idx, value */ 13, VALUE_OPT_LOAD_SIGNER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_SIGNER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-signer */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, aLoad_SignerCantList,
+     /* option proc      */ doOptLoad_Signer,
+     /* desc, NAME, name */ LOAD_SIGNER_DESC, LOAD_SIGNER_NAME, 
LOAD_SIGNER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 14, VALUE_OPT_INDER,
+     /* equiv idx, value */ 14, VALUE_OPT_INDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --inder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
+     /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
+
+  {  /* entry idx, value */ 15, VALUE_OPT_LOAD_REQUEST,
+     /* equiv idx, value */ 15, VALUE_OPT_LOAD_REQUEST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_REQUEST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-request */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Request,
+     /* desc, NAME, name */ LOAD_REQUEST_DESC, LOAD_REQUEST_NAME, 
LOAD_REQUEST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_LOAD_RESPONSE,
+     /* equiv idx, value */ 16, VALUE_OPT_LOAD_RESPONSE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_RESPONSE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-response */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Response,
+     /* desc, NAME, name */ LOAD_RESPONSE_DESC, LOAD_RESPONSE_NAME, 
LOAD_RESPONSE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the ocsptool Option Environment
+ */
+#define zPROGNAME       (ocsptool_opt_strs+1928)
+#define zUsageTitle     (ocsptool_opt_strs+1937)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (ocsptool_opt_strs+2040)
+#define zExplain        (ocsptool_opt_strs+2059)
+#define zDetail         (ocsptool_opt_strs+2062)
+#define zFullVersion    (ocsptool_opt_strs+2194)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define ocsptool_full_usage (NULL)
+
+#define ocsptool_short_usage (ocsptool_opt_strs+2213)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&ocsptoolOptions, OCSPTOOL_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the infile option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptInfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-issuer option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Issuer(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-cert option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Cert(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-trust option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Trust(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-signer option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Signer(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-request option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Request(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-response option.
+ *
+ * @param pOptions the ocsptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Response(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with ocsptool.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged ocsptool
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define ocsptool_packager_info NULL
+#else
+static char const ocsptool_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport ocsptool bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for ocsptool.  The one structure that
+ * binds them all.
+ */
+tOptions ocsptoolOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NEGATIONS
+    + OPTPROC_NO_ARGS
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    20 /* full option count */, 17 /* user option count */,
+    ocsptool_full_usage, ocsptool_short_usage,
+    NULL, NULL,
+    PKGDATADIR, ocsptool_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(OCSPTOOL_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the ocsptoolOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &ocsptoolOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        ocsptoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* ocsptool-args.c ends here */
diff --git a/src/ocsptool-args.h b/src/ocsptool-args.h
new file mode 100644
index 0000000..0367f1b
--- /dev/null
+++ b/src/ocsptool-args.h
@@ -0,0 +1,215 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (ocsptool-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:44 PM by AutoGen 5.16
+ *  From the definitions    ocsptool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the ocsptool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The ocsptool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  ocsptool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  ocsptool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the ocsptool program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_OCSPTOOL_ARGS_H_GUARD
+#define AUTOOPTS_OCSPTOOL_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG             =  0,
+    INDEX_OPT_VERBOSE           =  1,
+    INDEX_OPT_INFILE            =  2,
+    INDEX_OPT_OUTFILE           =  3,
+    INDEX_OPT_ASK               =  4,
+    INDEX_OPT_VERIFY_RESPONSE   =  5,
+    INDEX_OPT_REQUEST_INFO      =  6,
+    INDEX_OPT_RESPONSE_INFO     =  7,
+    INDEX_OPT_GENERATE_REQUEST  =  8,
+    INDEX_OPT_NONCE             =  9,
+    INDEX_OPT_LOAD_ISSUER       = 10,
+    INDEX_OPT_LOAD_CERT         = 11,
+    INDEX_OPT_LOAD_TRUST        = 12,
+    INDEX_OPT_LOAD_SIGNER       = 13,
+    INDEX_OPT_INDER             = 14,
+    INDEX_OPT_LOAD_REQUEST      = 15,
+    INDEX_OPT_LOAD_RESPONSE     = 16,
+    INDEX_OPT_VERSION           = 17,
+    INDEX_OPT_HELP              = 18,
+    INDEX_OPT_MORE_HELP         = 19
+} teOptIndex;
+
+#define OPTION_CT    20
+#define OCSPTOOL_VERSION       "@VERSION@"
+#define OCSPTOOL_FULL_VERSION  "ocsptool @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (ocsptoolOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of ocsptool exit codes
+ */
+typedef enum {
+    OCSPTOOL_EXIT_SUCCESS = 0,
+    OCSPTOOL_EXIT_FAILURE = 1,
+    OCSPTOOL_EXIT_LIBOPTS_FAILURE = 70
+} ocsptool_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_VERBOSE        'V'
+#define VALUE_OPT_INFILE         2
+#define VALUE_OPT_OUTFILE        3
+#define VALUE_OPT_ASK            4
+#define VALUE_OPT_VERIFY_RESPONSE 'e'
+#define VALUE_OPT_REQUEST_INFO   'i'
+#define VALUE_OPT_RESPONSE_INFO  'j'
+#define VALUE_OPT_GENERATE_REQUEST 'q'
+#define VALUE_OPT_NONCE          9
+#define VALUE_OPT_LOAD_ISSUER    10
+#define VALUE_OPT_LOAD_CERT      11
+#define VALUE_OPT_LOAD_TRUST     12
+#define VALUE_OPT_LOAD_SIGNER    13
+#define VALUE_OPT_INDER          14
+#define VALUE_OPT_LOAD_REQUEST   'Q'
+#define VALUE_OPT_LOAD_RESPONSE  'S'
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(ocsptoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(ocsptoolOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                ocsptoolOptions.curOptIdx = (n); \
+                ocsptoolOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*ocsptoolOptions.pUsageProc)(&ocsptoolOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the ocsptool option descriptor.
+ */
+extern tOptions ocsptoolOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(ocsptoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(ocsptoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(ocsptoolOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(ocsptoolOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_OCSPTOOL_ARGS_H_GUARD */
+/* ocsptool-args.h ends here */
diff --git a/src/p11tool-args.c b/src/p11tool-args.c
new file mode 100644
index 0000000..91eed27
--- /dev/null
+++ b/src/p11tool-args.c
@@ -0,0 +1,1274 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (p11tool-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:48 PM by AutoGen 5.16
+ *  From the definitions    p11tool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the p11tool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The p11tool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  p11tool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  p11tool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "p11tool-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (p11tool_opt_strs+0)
+#define zLicenseDescrip (p11tool_opt_strs+278)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  p11tool option static const strings
+ */
+static char const p11tool_opt_strs[3155] =
+/*     0 */ "p11tool @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   278 */ "p11tool is free software: you can redistribute it and/or modify 
it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "p11tool is distributed in the hope that it will be useful, but 
WITHOUT ANY\n"
+            "WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS\n"
+            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more\n"
+            "details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   881 */ "Enable debugging.\0"
+/*   899 */ "DEBUG\0"
+/*   905 */ "debug\0"
+/*   911 */ "Output file\0"
+/*   923 */ "OUTFILE\0"
+/*   931 */ "outfile\0"
+/*   939 */ "List all available tokens\0"
+/*   965 */ "LIST_TOKENS\0"
+/*   977 */ "list-tokens\0"
+/*   989 */ "Export the object specified by the URL\0"
+/*  1028 */ "EXPORT\0"
+/*  1035 */ "export\0"
+/*  1042 */ "List all available mechanisms in a token\0"
+/*  1083 */ "LIST_MECHANISMS\0"
+/*  1099 */ "list-mechanisms\0"
+/*  1115 */ "List all available objects in a token\0"
+/*  1153 */ "LIST_ALL\0"
+/*  1162 */ "list-all\0"
+/*  1171 */ "List all available certificates in a token\0"
+/*  1214 */ "LIST_ALL_CERTS\0"
+/*  1229 */ "list-all-certs\0"
+/*  1244 */ "List all certificates that have an associated private key\0"
+/*  1302 */ "LIST_CERTS\0"
+/*  1313 */ "list-certs\0"
+/*  1324 */ "List all available private keys in a token\0"
+/*  1367 */ "LIST_ALL_PRIVKEYS\0"
+/*  1385 */ "list-all-privkeys\0"
+/*  1403 */ "List all available certificates marked as trusted\0"
+/*  1453 */ "LIST_ALL_TRUSTED\0"
+/*  1470 */ "list-all-trusted\0"
+/*  1487 */ "Initializes a PKCS #11 token\0"
+/*  1516 */ "INITIALIZE\0"
+/*  1527 */ "initialize\0"
+/*  1538 */ "Writes the loaded objects to a PKCS #11 token\0"
+/*  1584 */ "WRITE\0"
+/*  1590 */ "write\0"
+/*  1596 */ "Deletes the objects matching the PKCS #11 URL\0"
+/*  1642 */ "DELETE\0"
+/*  1649 */ "delete\0"
+/*  1656 */ "Generate an RSA private-public key pair\0"
+/*  1696 */ "GENERATE_RSA\0"
+/*  1709 */ "generate-rsa\0"
+/*  1722 */ "GENERATE_DSA\0"
+/*  1735 */ "generate-dsa\0"
+/*  1748 */ "GENERATE_ECC\0"
+/*  1761 */ "generate-ecc\0"
+/*  1774 */ "Sets a label for the write operation\0"
+/*  1811 */ "LABEL\0"
+/*  1817 */ "label\0"
+/*  1823 */ "Marks the object to be written as trusted\0"
+/*  1865 */ "TRUSTED\0"
+/*  1873 */ "no-trusted\0"
+/*  1884 */ "no\0"
+/*  1887 */ "Marks the object to be written as private\0"
+/*  1929 */ "PRIVATE\0"
+/*  1937 */ "no-private\0"
+/*  1948 */ "Force login to token\0"
+/*  1969 */ "LOGIN\0"
+/*  1975 */ "no-login\0"
+/*  1984 */ "Print detailed URLs\0"
+/*  2004 */ "DETAILED_URL\0"
+/*  2017 */ "no-detailed-url\0"
+/*  2033 */ "Provide a hex encoded secret key\0"
+/*  2066 */ "SECRET_KEY\0"
+/*  2077 */ "secret-key\0"
+/*  2088 */ "Private key file to use\0"
+/*  2112 */ "LOAD_PRIVKEY\0"
+/*  2125 */ "load-privkey\0"
+/*  2138 */ "Public key file to use\0"
+/*  2161 */ "LOAD_PUBKEY\0"
+/*  2173 */ "load-pubkey\0"
+/*  2185 */ "Certificate file to use\0"
+/*  2209 */ "LOAD_CERTIFICATE\0"
+/*  2226 */ "load-certificate\0"
+/*  2243 */ "Use PKCS #8 format for private keys\0"
+/*  2279 */ "PKCS8\0"
+/*  2285 */ "pkcs8\0"
+/*  2291 */ "Specify the number of bits for key generate\0"
+/*  2335 */ "BITS\0"
+/*  2340 */ "bits\0"
+/*  2345 */ "Specify the security level\0"
+/*  2372 */ "SEC_PARAM\0"
+/*  2382 */ "sec-param\0"
+/*  2392 */ "Use DER/RAW format for input\0"
+/*  2421 */ "INDER\0"
+/*  2427 */ "no-inder\0"
+/*  2436 */ "This is an alias for 'inder'\0"
+/*  2465 */ "inraw\0"
+/*  2471 */ "Specify the PKCS #11 provider library\0"
+/*  2509 */ "PROVIDER\0"
+/*  2518 */ "provider\0"
+/*  2527 */ "Display extended usage information and exit\0"
+/*  2571 */ "help\0"
+/*  2576 */ "Extended usage information passed thru pager\0"
+/*  2621 */ "more-help\0"
+/*  2631 */ "Output version information and exit\0"
+/*  2667 */ "version\0"
+/*  2675 */ "P11TOOL\0"
+/*  2683 */ "p11tool - GnuTLS PKCS #11 tool - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
[url]\n\0"
+/*  2795 */ "address@hidden"
+/*  2814 */ "\n\n\0"
+/*  2817 */ "\n"
+            "Program that allows handling data from PKCS #11 smart cards and 
security\n"
+            "modules.\n\n"
+            "To use PKCS #11 tokens with gnutls the configuration file\n"
+            "/etc/gnutls/pkcs11.conf has to exist and contain a number of 
lines of the\n"
+            "form 'load=/usr/lib/opensc-pkcs11.so'.\n\0"
+/*  3073 */ "p11tool @address@hidden"
+/*  3091 */ "p11tool [options] [url]\n"
+            "p11tool --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (p11tool_opt_strs+881)
+#define DEBUG_NAME      (p11tool_opt_strs+899)
+#define DEBUG_name      (p11tool_opt_strs+905)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  outfile option description:
+ */
+#define OUTFILE_DESC      (p11tool_opt_strs+911)
+#define OUTFILE_NAME      (p11tool_opt_strs+923)
+#define OUTFILE_name      (p11tool_opt_strs+931)
+#define OUTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  list-tokens option description:
+ */
+#define LIST_TOKENS_DESC      (p11tool_opt_strs+939)
+#define LIST_TOKENS_NAME      (p11tool_opt_strs+965)
+#define LIST_TOKENS_name      (p11tool_opt_strs+977)
+#define LIST_TOKENS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  export option description:
+ */
+#define EXPORT_DESC      (p11tool_opt_strs+989)
+#define EXPORT_NAME      (p11tool_opt_strs+1028)
+#define EXPORT_name      (p11tool_opt_strs+1035)
+#define EXPORT_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-mechanisms option description:
+ */
+#define LIST_MECHANISMS_DESC      (p11tool_opt_strs+1042)
+#define LIST_MECHANISMS_NAME      (p11tool_opt_strs+1083)
+#define LIST_MECHANISMS_name      (p11tool_opt_strs+1099)
+#define LIST_MECHANISMS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-all option description:
+ */
+#define LIST_ALL_DESC      (p11tool_opt_strs+1115)
+#define LIST_ALL_NAME      (p11tool_opt_strs+1153)
+#define LIST_ALL_name      (p11tool_opt_strs+1162)
+#define LIST_ALL_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-all-certs option description:
+ */
+#define LIST_ALL_CERTS_DESC      (p11tool_opt_strs+1171)
+#define LIST_ALL_CERTS_NAME      (p11tool_opt_strs+1214)
+#define LIST_ALL_CERTS_name      (p11tool_opt_strs+1229)
+#define LIST_ALL_CERTS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-certs option description:
+ */
+#define LIST_CERTS_DESC      (p11tool_opt_strs+1244)
+#define LIST_CERTS_NAME      (p11tool_opt_strs+1302)
+#define LIST_CERTS_name      (p11tool_opt_strs+1313)
+#define LIST_CERTS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-all-privkeys option description:
+ */
+#define LIST_ALL_PRIVKEYS_DESC      (p11tool_opt_strs+1324)
+#define LIST_ALL_PRIVKEYS_NAME      (p11tool_opt_strs+1367)
+#define LIST_ALL_PRIVKEYS_name      (p11tool_opt_strs+1385)
+#define LIST_ALL_PRIVKEYS_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  list-all-trusted option description:
+ */
+#define LIST_ALL_TRUSTED_DESC      (p11tool_opt_strs+1403)
+#define LIST_ALL_TRUSTED_NAME      (p11tool_opt_strs+1453)
+#define LIST_ALL_TRUSTED_name      (p11tool_opt_strs+1470)
+#define LIST_ALL_TRUSTED_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  initialize option description:
+ */
+#define INITIALIZE_DESC      (p11tool_opt_strs+1487)
+#define INITIALIZE_NAME      (p11tool_opt_strs+1516)
+#define INITIALIZE_name      (p11tool_opt_strs+1527)
+#define INITIALIZE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  write option description:
+ */
+#define WRITE_DESC      (p11tool_opt_strs+1538)
+#define WRITE_NAME      (p11tool_opt_strs+1584)
+#define WRITE_name      (p11tool_opt_strs+1590)
+#define WRITE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  delete option description:
+ */
+#define DELETE_DESC      (p11tool_opt_strs+1596)
+#define DELETE_NAME      (p11tool_opt_strs+1642)
+#define DELETE_name      (p11tool_opt_strs+1649)
+#define DELETE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-rsa option description:
+ */
+#define GENERATE_RSA_DESC      (p11tool_opt_strs+1656)
+#define GENERATE_RSA_NAME      (p11tool_opt_strs+1696)
+#define GENERATE_RSA_name      (p11tool_opt_strs+1709)
+#define GENERATE_RSA_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-dsa option description:
+ */
+#define GENERATE_DSA_DESC      (p11tool_opt_strs+1656)
+#define GENERATE_DSA_NAME      (p11tool_opt_strs+1722)
+#define GENERATE_DSA_name      (p11tool_opt_strs+1735)
+#define GENERATE_DSA_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate-ecc option description:
+ */
+#define GENERATE_ECC_DESC      (p11tool_opt_strs+1656)
+#define GENERATE_ECC_NAME      (p11tool_opt_strs+1748)
+#define GENERATE_ECC_name      (p11tool_opt_strs+1761)
+#define GENERATE_ECC_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  label option description:
+ */
+#define LABEL_DESC      (p11tool_opt_strs+1774)
+#define LABEL_NAME      (p11tool_opt_strs+1811)
+#define LABEL_name      (p11tool_opt_strs+1817)
+#define LABEL_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  trusted option description:
+ */
+#define TRUSTED_DESC      (p11tool_opt_strs+1823)
+#define TRUSTED_NAME      (p11tool_opt_strs+1865)
+#define NOT_TRUSTED_name  (p11tool_opt_strs+1873)
+#define NOT_TRUSTED_PFX   (p11tool_opt_strs+1884)
+#define TRUSTED_name      (NOT_TRUSTED_name + 3)
+#define TRUSTED_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  private option description:
+ */
+#define PRIVATE_DESC      (p11tool_opt_strs+1887)
+#define PRIVATE_NAME      (p11tool_opt_strs+1929)
+#define NOT_PRIVATE_name  (p11tool_opt_strs+1937)
+#define NOT_PRIVATE_PFX   (p11tool_opt_strs+1884)
+#define PRIVATE_name      (NOT_PRIVATE_name + 3)
+#define PRIVATE_FLAGS     (OPTST_INITENABLED)
+
+/*
+ *  login option description:
+ */
+#define LOGIN_DESC      (p11tool_opt_strs+1948)
+#define LOGIN_NAME      (p11tool_opt_strs+1969)
+#define NOT_LOGIN_name  (p11tool_opt_strs+1975)
+#define NOT_LOGIN_PFX   (p11tool_opt_strs+1884)
+#define LOGIN_name      (NOT_LOGIN_name + 3)
+#define LOGIN_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  detailed-url option description:
+ */
+#define DETAILED_URL_DESC      (p11tool_opt_strs+1984)
+#define DETAILED_URL_NAME      (p11tool_opt_strs+2004)
+#define NOT_DETAILED_URL_name  (p11tool_opt_strs+2017)
+#define NOT_DETAILED_URL_PFX   (p11tool_opt_strs+1884)
+#define DETAILED_URL_name      (NOT_DETAILED_URL_name + 3)
+#define DETAILED_URL_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  secret-key option description:
+ */
+#define SECRET_KEY_DESC      (p11tool_opt_strs+2033)
+#define SECRET_KEY_NAME      (p11tool_opt_strs+2066)
+#define SECRET_KEY_name      (p11tool_opt_strs+2077)
+#define SECRET_KEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  load-privkey option description:
+ */
+#define LOAD_PRIVKEY_DESC      (p11tool_opt_strs+2088)
+#define LOAD_PRIVKEY_NAME      (p11tool_opt_strs+2112)
+#define LOAD_PRIVKEY_name      (p11tool_opt_strs+2125)
+#define LOAD_PRIVKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-pubkey option description:
+ */
+#define LOAD_PUBKEY_DESC      (p11tool_opt_strs+2138)
+#define LOAD_PUBKEY_NAME      (p11tool_opt_strs+2161)
+#define LOAD_PUBKEY_name      (p11tool_opt_strs+2173)
+#define LOAD_PUBKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  load-certificate option description:
+ */
+#define LOAD_CERTIFICATE_DESC      (p11tool_opt_strs+2185)
+#define LOAD_CERTIFICATE_NAME      (p11tool_opt_strs+2209)
+#define LOAD_CERTIFICATE_name      (p11tool_opt_strs+2226)
+#define LOAD_CERTIFICATE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pkcs8 option description:
+ */
+#define PKCS8_DESC      (p11tool_opt_strs+2243)
+#define PKCS8_NAME      (p11tool_opt_strs+2279)
+#define PKCS8_name      (p11tool_opt_strs+2285)
+#define PKCS8_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  bits option description:
+ */
+#define BITS_DESC      (p11tool_opt_strs+2291)
+#define BITS_NAME      (p11tool_opt_strs+2335)
+#define BITS_name      (p11tool_opt_strs+2340)
+#define BITS_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  sec-param option description:
+ */
+#define SEC_PARAM_DESC      (p11tool_opt_strs+2345)
+#define SEC_PARAM_NAME      (p11tool_opt_strs+2372)
+#define SEC_PARAM_name      (p11tool_opt_strs+2382)
+#define SEC_PARAM_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  inder option description:
+ */
+#define INDER_DESC      (p11tool_opt_strs+2392)
+#define INDER_NAME      (p11tool_opt_strs+2421)
+#define NOT_INDER_name  (p11tool_opt_strs+2427)
+#define NOT_INDER_PFX   (p11tool_opt_strs+1884)
+#define INDER_name      (NOT_INDER_name + 3)
+#define INDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  inraw option description:
+ */
+#define INRAW_DESC    (p11tool_opt_strs+2436)
+#define INRAW_NAME    NULL
+#define INRAW_name    (p11tool_opt_strs+2465)
+#define INRAW_FLAGS     (INDER_FLAGS | OPTST_ALIAS)
+
+/*
+ *  provider option description:
+ */
+#define PROVIDER_DESC      (p11tool_opt_strs+2471)
+#define PROVIDER_NAME      (p11tool_opt_strs+2509)
+#define PROVIDER_name      (p11tool_opt_strs+2518)
+#define PROVIDER_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (p11tool_opt_strs+2527)
+#define HELP_name       (p11tool_opt_strs+2571)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (p11tool_opt_strs+2576)
+#define MORE_HELP_name  (p11tool_opt_strs+2621)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (p11tool_opt_strs+2631)
+#define VER_name        (p11tool_opt_strs+2667)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug,            doOptInraw,            doOptLoad_Certificate,
+    doOptLoad_Privkey,     doOptLoad_Pubkey,      doOptProvider,
+    doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the p11tool Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the p11tool program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_OUTFILE,
+     /* equiv idx, value */ 1, VALUE_OPT_OUTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OUTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --outfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ OUTFILE_DESC, OUTFILE_NAME, OUTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_LIST_TOKENS,
+     /* equiv idx, value */ 2, VALUE_OPT_LIST_TOKENS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_TOKENS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-tokens */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_TOKENS_DESC, LIST_TOKENS_NAME, 
LIST_TOKENS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_EXPORT,
+     /* equiv idx, value */ 3, VALUE_OPT_EXPORT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ EXPORT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --export */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ EXPORT_DESC, EXPORT_NAME, EXPORT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_LIST_MECHANISMS,
+     /* equiv idx, value */ 4, VALUE_OPT_LIST_MECHANISMS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_MECHANISMS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-mechanisms */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_MECHANISMS_DESC, LIST_MECHANISMS_NAME, 
LIST_MECHANISMS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_LIST_ALL,
+     /* equiv idx, value */ 5, VALUE_OPT_LIST_ALL,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_ALL_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-all */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_ALL_DESC, LIST_ALL_NAME, LIST_ALL_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_LIST_ALL_CERTS,
+     /* equiv idx, value */ 6, VALUE_OPT_LIST_ALL_CERTS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_ALL_CERTS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-all-certs */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_ALL_CERTS_DESC, LIST_ALL_CERTS_NAME, 
LIST_ALL_CERTS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_LIST_CERTS,
+     /* equiv idx, value */ 7, VALUE_OPT_LIST_CERTS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_CERTS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-certs */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_CERTS_DESC, LIST_CERTS_NAME, LIST_CERTS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_LIST_ALL_PRIVKEYS,
+     /* equiv idx, value */ 8, VALUE_OPT_LIST_ALL_PRIVKEYS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_ALL_PRIVKEYS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-all-privkeys */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_ALL_PRIVKEYS_DESC, LIST_ALL_PRIVKEYS_NAME, 
LIST_ALL_PRIVKEYS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 9, VALUE_OPT_LIST_ALL_TRUSTED,
+     /* equiv idx, value */ 9, VALUE_OPT_LIST_ALL_TRUSTED,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_ALL_TRUSTED_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list-all-trusted */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_ALL_TRUSTED_DESC, LIST_ALL_TRUSTED_NAME, 
LIST_ALL_TRUSTED_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_INITIALIZE,
+     /* equiv idx, value */ 10, VALUE_OPT_INITIALIZE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INITIALIZE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --initialize */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INITIALIZE_DESC, INITIALIZE_NAME, INITIALIZE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_WRITE,
+     /* equiv idx, value */ 11, VALUE_OPT_WRITE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ WRITE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --write */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ WRITE_DESC, WRITE_NAME, WRITE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 12, VALUE_OPT_DELETE,
+     /* equiv idx, value */ 12, VALUE_OPT_DELETE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DELETE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --delete */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DELETE_DESC, DELETE_NAME, DELETE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 13, VALUE_OPT_GENERATE_RSA,
+     /* equiv idx, value */ 13, VALUE_OPT_GENERATE_RSA,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_RSA_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-rsa */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_RSA_DESC, GENERATE_RSA_NAME, 
GENERATE_RSA_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 14, VALUE_OPT_GENERATE_DSA,
+     /* equiv idx, value */ 14, VALUE_OPT_GENERATE_DSA,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_DSA_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-dsa */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_DSA_DESC, GENERATE_DSA_NAME, 
GENERATE_DSA_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 15, VALUE_OPT_GENERATE_ECC,
+     /* equiv idx, value */ 15, VALUE_OPT_GENERATE_ECC,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_ECC_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate-ecc */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_ECC_DESC, GENERATE_ECC_NAME, 
GENERATE_ECC_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_LABEL,
+     /* equiv idx, value */ 16, VALUE_OPT_LABEL,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LABEL_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --label */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LABEL_DESC, LABEL_NAME, LABEL_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 17, VALUE_OPT_TRUSTED,
+     /* equiv idx, value */ 17, VALUE_OPT_TRUSTED,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ TRUSTED_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --trusted */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ TRUSTED_DESC, TRUSTED_NAME, TRUSTED_name,
+     /* disablement strs */ NOT_TRUSTED_name, NOT_TRUSTED_PFX },
+
+  {  /* entry idx, value */ 18, VALUE_OPT_PRIVATE,
+     /* equiv idx, value */ 18, VALUE_OPT_PRIVATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PRIVATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --private */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PRIVATE_DESC, PRIVATE_NAME, PRIVATE_name,
+     /* disablement strs */ NOT_PRIVATE_name, NOT_PRIVATE_PFX },
+
+  {  /* entry idx, value */ 19, VALUE_OPT_LOGIN,
+     /* equiv idx, value */ 19, VALUE_OPT_LOGIN,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOGIN_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --login */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LOGIN_DESC, LOGIN_NAME, LOGIN_name,
+     /* disablement strs */ NOT_LOGIN_name, NOT_LOGIN_PFX },
+
+  {  /* entry idx, value */ 20, VALUE_OPT_DETAILED_URL,
+     /* equiv idx, value */ 20, VALUE_OPT_DETAILED_URL,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DETAILED_URL_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --detailed-url */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DETAILED_URL_DESC, DETAILED_URL_NAME, 
DETAILED_URL_name,
+     /* disablement strs */ NOT_DETAILED_URL_name, NOT_DETAILED_URL_PFX },
+
+  {  /* entry idx, value */ 21, VALUE_OPT_SECRET_KEY,
+     /* equiv idx, value */ 21, VALUE_OPT_SECRET_KEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SECRET_KEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --secret-key */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SECRET_KEY_DESC, SECRET_KEY_NAME, SECRET_KEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 22, VALUE_OPT_LOAD_PRIVKEY,
+     /* equiv idx, value */ 22, VALUE_OPT_LOAD_PRIVKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_PRIVKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-privkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Privkey,
+     /* desc, NAME, name */ LOAD_PRIVKEY_DESC, LOAD_PRIVKEY_NAME, 
LOAD_PRIVKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 23, VALUE_OPT_LOAD_PUBKEY,
+     /* equiv idx, value */ 23, VALUE_OPT_LOAD_PUBKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_PUBKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-pubkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Pubkey,
+     /* desc, NAME, name */ LOAD_PUBKEY_DESC, LOAD_PUBKEY_NAME, 
LOAD_PUBKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 24, VALUE_OPT_LOAD_CERTIFICATE,
+     /* equiv idx, value */ 24, VALUE_OPT_LOAD_CERTIFICATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LOAD_CERTIFICATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --load-certificate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptLoad_Certificate,
+     /* desc, NAME, name */ LOAD_CERTIFICATE_DESC, LOAD_CERTIFICATE_NAME, 
LOAD_CERTIFICATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 25, VALUE_OPT_PKCS8,
+     /* equiv idx, value */ 25, VALUE_OPT_PKCS8,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PKCS8_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pkcs8 */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PKCS8_DESC, PKCS8_NAME, PKCS8_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 26, VALUE_OPT_BITS,
+     /* equiv idx, value */ 26, VALUE_OPT_BITS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ BITS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --bits */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ optionNumericVal,
+     /* desc, NAME, name */ BITS_DESC, BITS_NAME, BITS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 27, VALUE_OPT_SEC_PARAM,
+     /* equiv idx, value */ 27, VALUE_OPT_SEC_PARAM,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SEC_PARAM_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --sec-param */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SEC_PARAM_DESC, SEC_PARAM_NAME, SEC_PARAM_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 28, VALUE_OPT_INDER,
+     /* equiv idx, value */ 28, VALUE_OPT_INDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --inder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INDER_DESC, INDER_NAME, INDER_name,
+     /* disablement strs */ NOT_INDER_name, NOT_INDER_PFX },
+
+  {  /* entry idx, value */ 29, VALUE_OPT_INRAW,
+     /* equiv idx, value */ 29, VALUE_OPT_INRAW,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INRAW_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --inraw */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptInraw,
+     /* desc, NAME, name */ INRAW_DESC, INRAW_NAME, INRAW_name,
+     /* disablement strs */ 0, 0 },
+
+  {  /* entry idx, value */ 30, VALUE_OPT_PROVIDER,
+     /* equiv idx, value */ 30, VALUE_OPT_PROVIDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PROVIDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --provider */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptProvider,
+     /* desc, NAME, name */ PROVIDER_DESC, PROVIDER_NAME, PROVIDER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the p11tool Option Environment
+ */
+#define zPROGNAME       (p11tool_opt_strs+2675)
+#define zUsageTitle     (p11tool_opt_strs+2683)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (p11tool_opt_strs+2795)
+#define zExplain        (p11tool_opt_strs+2814)
+#define zDetail         (p11tool_opt_strs+2817)
+#define zFullVersion    (p11tool_opt_strs+3073)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define p11tool_full_usage (NULL)
+
+#define p11tool_short_usage (p11tool_opt_strs+3091)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&p11toolOptions, P11TOOL_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-privkey option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Privkey(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-pubkey option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Pubkey(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the load-certificate option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptLoad_Certificate(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the inraw option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptInraw(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    int res = optionAlias(pOptions, pOptDesc, INDEX_OPT_INDER);
+    if ((res != 0) && ((pOptions->fOptSet & OPTPROC_ERRSTOP) != 0))
+        USAGE(P11TOOL_EXIT_FAILURE);
+
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the provider option.
+ *
+ * @param pOptions the p11tool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptProvider(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with p11tool.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged p11tool
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define p11tool_packager_info NULL
+#else
+static char const p11tool_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport p11tool bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for p11tool.  The one structure that
+ * binds them all.
+ */
+tOptions p11toolOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NEGATIONS
+    + OPTPROC_REORDER
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    34 /* full option count */, 31 /* user option count */,
+    p11tool_full_usage, p11tool_short_usage,
+    NULL, NULL,
+    PKGDATADIR, p11tool_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(P11TOOL_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the p11toolOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &p11toolOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        p11toolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* p11tool-args.c ends here */
diff --git a/src/p11tool-args.h b/src/p11tool-args.h
new file mode 100644
index 0000000..0e92da6
--- /dev/null
+++ b/src/p11tool-args.h
@@ -0,0 +1,245 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (p11tool-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:48 PM by AutoGen 5.16
+ *  From the definitions    p11tool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the p11tool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The p11tool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  p11tool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  p11tool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the p11tool program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_P11TOOL_ARGS_H_GUARD
+#define AUTOOPTS_P11TOOL_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG              =  0,
+    INDEX_OPT_OUTFILE            =  1,
+    INDEX_OPT_LIST_TOKENS        =  2,
+    INDEX_OPT_EXPORT             =  3,
+    INDEX_OPT_LIST_MECHANISMS    =  4,
+    INDEX_OPT_LIST_ALL           =  5,
+    INDEX_OPT_LIST_ALL_CERTS     =  6,
+    INDEX_OPT_LIST_CERTS         =  7,
+    INDEX_OPT_LIST_ALL_PRIVKEYS  =  8,
+    INDEX_OPT_LIST_ALL_TRUSTED   =  9,
+    INDEX_OPT_INITIALIZE         = 10,
+    INDEX_OPT_WRITE              = 11,
+    INDEX_OPT_DELETE             = 12,
+    INDEX_OPT_GENERATE_RSA       = 13,
+    INDEX_OPT_GENERATE_DSA       = 14,
+    INDEX_OPT_GENERATE_ECC       = 15,
+    INDEX_OPT_LABEL              = 16,
+    INDEX_OPT_TRUSTED            = 17,
+    INDEX_OPT_PRIVATE            = 18,
+    INDEX_OPT_LOGIN              = 19,
+    INDEX_OPT_DETAILED_URL       = 20,
+    INDEX_OPT_SECRET_KEY         = 21,
+    INDEX_OPT_LOAD_PRIVKEY       = 22,
+    INDEX_OPT_LOAD_PUBKEY        = 23,
+    INDEX_OPT_LOAD_CERTIFICATE   = 24,
+    INDEX_OPT_PKCS8              = 25,
+    INDEX_OPT_BITS               = 26,
+    INDEX_OPT_SEC_PARAM          = 27,
+    INDEX_OPT_INDER              = 28,
+    INDEX_OPT_INRAW              = 29,
+    INDEX_OPT_PROVIDER           = 30,
+    INDEX_OPT_VERSION            = 31,
+    INDEX_OPT_HELP               = 32,
+    INDEX_OPT_MORE_HELP          = 33
+} teOptIndex;
+
+#define OPTION_CT    34
+#define P11TOOL_VERSION       "@VERSION@"
+#define P11TOOL_FULL_VERSION  "p11tool @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (p11toolOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of p11tool exit codes
+ */
+typedef enum {
+    P11TOOL_EXIT_SUCCESS = 0,
+    P11TOOL_EXIT_FAILURE = 1,
+    P11TOOL_EXIT_LIBOPTS_FAILURE = 70
+} p11tool_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_OUTFILE        1
+#define VALUE_OPT_LIST_TOKENS    2
+#define VALUE_OPT_EXPORT         3
+#define VALUE_OPT_LIST_MECHANISMS 4
+#define VALUE_OPT_LIST_ALL       5
+#define VALUE_OPT_LIST_ALL_CERTS 6
+#define VALUE_OPT_LIST_CERTS     7
+#define VALUE_OPT_LIST_ALL_PRIVKEYS 8
+#define VALUE_OPT_LIST_ALL_TRUSTED 9
+#define VALUE_OPT_INITIALIZE     10
+#define VALUE_OPT_WRITE          11
+#define VALUE_OPT_DELETE         12
+#define VALUE_OPT_GENERATE_RSA   13
+#define VALUE_OPT_GENERATE_DSA   14
+#define VALUE_OPT_GENERATE_ECC   15
+#define VALUE_OPT_LABEL          16
+#define VALUE_OPT_TRUSTED        17
+#define VALUE_OPT_PRIVATE        18
+#define VALUE_OPT_LOGIN          19
+#define VALUE_OPT_DETAILED_URL   20
+#define VALUE_OPT_SECRET_KEY     21
+#define VALUE_OPT_LOAD_PRIVKEY   22
+#define VALUE_OPT_LOAD_PUBKEY    23
+#define VALUE_OPT_LOAD_CERTIFICATE 24
+#define VALUE_OPT_PKCS8          '8'
+#define VALUE_OPT_BITS           26
+
+#define OPT_VALUE_BITS           (DESC(BITS).optArg.argInt)
+#define VALUE_OPT_SEC_PARAM      27
+#define VALUE_OPT_INDER          28
+#define VALUE_OPT_INRAW          29
+#define VALUE_OPT_PROVIDER       30
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(p11toolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(p11toolOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                p11toolOptions.curOptIdx = (n); \
+                p11toolOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*p11toolOptions.pUsageProc)(&p11toolOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the p11tool option descriptor.
+ */
+extern tOptions p11toolOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(p11toolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(p11toolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(p11toolOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(p11toolOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_P11TOOL_ARGS_H_GUARD */
+/* p11tool-args.h ends here */
diff --git a/src/psk-args.c b/src/psk-args.c
new file mode 100644
index 0000000..232dd76
--- /dev/null
+++ b/src/psk-args.c
@@ -0,0 +1,569 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (psk-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    psk-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the psktool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The psktool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  psktool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  psktool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "psk-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (psktool_opt_strs+0)
+#define zLicenseDescrip (psktool_opt_strs+278)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  psktool option static const strings
+ */
+static char const psktool_opt_strs[1505] =
+/*     0 */ "psktool @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   278 */ "psktool is free software: you can redistribute it and/or modify 
it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "psktool is distributed in the hope that it will be useful, but 
WITHOUT ANY\n"
+            "WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS\n"
+            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more\n"
+            "details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   881 */ "Enable debugging.\0"
+/*   899 */ "DEBUG\0"
+/*   905 */ "debug\0"
+/*   911 */ "specify the key size in bytes\0"
+/*   941 */ "KEYSIZE\0"
+/*   949 */ "keysize\0"
+/*   957 */ "specify a username\0"
+/*   976 */ "USERNAME\0"
+/*   985 */ "username\0"
+/*   994 */ "specify a password file.\0"
+/*  1019 */ "PASSWD\0"
+/*  1026 */ "passwd\0"
+/*  1033 */ "Display extended usage information and exit\0"
+/*  1077 */ "help\0"
+/*  1082 */ "Extended usage information passed thru pager\0"
+/*  1127 */ "more-help\0"
+/*  1137 */ "Output version information and exit\0"
+/*  1173 */ "version\0"
+/*  1181 */ "PSKTOOL\0"
+/*  1189 */ "psktool - GnuTLS PSK tool - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/*  1290 */ "address@hidden"
+/*  1309 */ "\n\n\0"
+/*  1312 */ "\n"
+            "Program that generates random keys for use with TLS-PSK.  The 
keys are\n"
+            "stored in hexadecimal format in a key file.\n\0"
+/*  1429 */ "psktool @address@hidden"
+/*  1447 */ "psktool [options]\n"
+            "psktool --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (psktool_opt_strs+881)
+#define DEBUG_NAME      (psktool_opt_strs+899)
+#define DEBUG_name      (psktool_opt_strs+905)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  keysize option description:
+ */
+#define KEYSIZE_DESC      (psktool_opt_strs+911)
+#define KEYSIZE_NAME      (psktool_opt_strs+941)
+#define KEYSIZE_name      (psktool_opt_strs+949)
+#define KEYSIZE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  username option description:
+ */
+#define USERNAME_DESC      (psktool_opt_strs+957)
+#define USERNAME_NAME      (psktool_opt_strs+976)
+#define USERNAME_name      (psktool_opt_strs+985)
+#define USERNAME_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  passwd option description:
+ */
+#define PASSWD_DESC      (psktool_opt_strs+994)
+#define PASSWD_NAME      (psktool_opt_strs+1019)
+#define PASSWD_name      (psktool_opt_strs+1026)
+#define PASSWD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (psktool_opt_strs+1033)
+#define HELP_name       (psktool_opt_strs+1077)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (psktool_opt_strs+1082)
+#define MORE_HELP_name  (psktool_opt_strs+1127)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (psktool_opt_strs+1137)
+#define VER_name        (psktool_opt_strs+1173)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug, doOptKeysize, doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the psktool Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the psktool program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_KEYSIZE,
+     /* equiv idx, value */ 1, VALUE_OPT_KEYSIZE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ KEYSIZE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --keysize */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptKeysize,
+     /* desc, NAME, name */ KEYSIZE_DESC, KEYSIZE_NAME, KEYSIZE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_USERNAME,
+     /* equiv idx, value */ 2, VALUE_OPT_USERNAME,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ USERNAME_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --username */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ USERNAME_DESC, USERNAME_NAME, USERNAME_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_PASSWD,
+     /* equiv idx, value */ 3, VALUE_OPT_PASSWD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PASSWD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --passwd */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PASSWD_DESC, PASSWD_NAME, PASSWD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the psktool Option Environment
+ */
+#define zPROGNAME       (psktool_opt_strs+1181)
+#define zUsageTitle     (psktool_opt_strs+1189)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (psktool_opt_strs+1290)
+#define zExplain        (psktool_opt_strs+1309)
+#define zDetail         (psktool_opt_strs+1312)
+#define zFullVersion    (psktool_opt_strs+1429)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define psktool_full_usage (NULL)
+
+#define psktool_short_usage (psktool_opt_strs+1447)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&psktoolOptions, PSKTOOL_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the psktool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the keysize option.
+ *
+ * @param pOptions the psktool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptKeysize(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  512 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with psktool.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged psktool
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define psktool_packager_info NULL
+#else
+static char const psktool_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport psktool bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for psktool.  The one structure that
+ * binds them all.
+ */
+tOptions psktoolOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NO_ARGS
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    7 /* full option count */, 4 /* user option count */,
+    psktool_full_usage, psktool_short_usage,
+    NULL, NULL,
+    PKGDATADIR, psktool_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(PSKTOOL_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the psktoolOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &psktoolOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        psktoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* psk-args.c ends here */
diff --git a/src/psk-args.h b/src/psk-args.h
new file mode 100644
index 0000000..e682e2c
--- /dev/null
+++ b/src/psk-args.h
@@ -0,0 +1,191 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (psk-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:46 PM by AutoGen 5.16
+ *  From the definitions    psk-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the psktool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The psktool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  psktool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  psktool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the psktool program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_PSK_ARGS_H_GUARD
+#define AUTOOPTS_PSK_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG       =  0,
+    INDEX_OPT_KEYSIZE     =  1,
+    INDEX_OPT_USERNAME    =  2,
+    INDEX_OPT_PASSWD      =  3,
+    INDEX_OPT_VERSION     =  4,
+    INDEX_OPT_HELP        =  5,
+    INDEX_OPT_MORE_HELP   =  6
+} teOptIndex;
+
+#define OPTION_CT    7
+#define PSKTOOL_VERSION       "@VERSION@"
+#define PSKTOOL_FULL_VERSION  "psktool @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (psktoolOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of psktool exit codes
+ */
+typedef enum {
+    PSKTOOL_EXIT_SUCCESS = 0,
+    PSKTOOL_EXIT_FAILURE = 1,
+    PSKTOOL_EXIT_LIBOPTS_FAILURE = 70
+} psktool_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_KEYSIZE        's'
+
+#define OPT_VALUE_KEYSIZE        (DESC(KEYSIZE).optArg.argInt)
+#define VALUE_OPT_USERNAME       'u'
+#define VALUE_OPT_PASSWD         'p'
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(psktoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(psktoolOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                psktoolOptions.curOptIdx = (n); \
+                psktoolOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*psktoolOptions.pUsageProc)(&psktoolOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the psktool option descriptor.
+ */
+extern tOptions psktoolOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(psktoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(psktoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(psktoolOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(psktoolOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_PSK_ARGS_H_GUARD */
+/* psk-args.h ends here */
diff --git a/src/serv-args.c b/src/serv-args.c
new file mode 100644
index 0000000..1d6bd62
--- /dev/null
+++ b/src/serv-args.c
@@ -0,0 +1,1398 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (serv-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:45 PM by AutoGen 5.16
+ *  From the definitions    serv-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-serv author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-serv program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-serv is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-serv is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "serv-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (gnutls_serv_opt_strs+0)
+#define zLicenseDescrip (gnutls_serv_opt_strs+282)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  gnutls-serv option static const strings
+ */
+static char const gnutls_serv_opt_strs[2947] =
+/*     0 */ "gnutls-serv @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   282 */ "gnutls-serv is free software: you can redistribute it and/or 
modify it\n"
+            "under the terms of the GNU General Public License as published by 
the Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "gnutls-serv is distributed in the hope that it will be useful, 
but WITHOUT\n"
+            "ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or\n"
+            "FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public 
License for\n"
+            "more details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   893 */ "Enable debugging.\0"
+/*   911 */ "DEBUG\0"
+/*   917 */ "debug\0"
+/*   923 */ "Don't accept session tickets\0"
+/*   952 */ "NOTICKET\0"
+/*   961 */ "noticket\0"
+/*   970 */ "Generate Diffie-Hellman and RSA-export parameters\0"
+/*  1020 */ "GENERATE\0"
+/*  1029 */ "generate\0"
+/*  1038 */ "Suppress some messages\0"
+/*  1061 */ "QUIET\0"
+/*  1067 */ "quiet\0"
+/*  1073 */ "Do not use a resumption database\0"
+/*  1106 */ "NODB\0"
+/*  1111 */ "nodb\0"
+/*  1116 */ "Act as an HTTP server\0"
+/*  1138 */ "HTTP\0"
+/*  1143 */ "http\0"
+/*  1148 */ "Act as an Echo server\0"
+/*  1170 */ "ECHO\0"
+/*  1175 */ "echo\0"
+/*  1180 */ "Use DTLS (datagram TLS) over UDP\0"
+/*  1213 */ "UDP\0"
+/*  1217 */ "udp\0"
+/*  1221 */ "Set MTU for datagram TLS\0"
+/*  1246 */ "MTU\0"
+/*  1250 */ "mtu\0"
+/*  1254 */ "Do not request a client certificate\0"
+/*  1290 */ "DISABLE_CLIENT_CERT\0"
+/*  1310 */ "disable-client-cert\0"
+/*  1330 */ "Require a client certificate\0"
+/*  1359 */ "REQUIRE_CLIENT_CERT\0"
+/*  1379 */ "require-client-cert\0"
+/*  1399 */ "Use DER format for certificates to read from\0"
+/*  1444 */ "X509FMTDER\0"
+/*  1455 */ "x509fmtder\0"
+/*  1466 */ "Priorities string\0"
+/*  1484 */ "PRIORITY\0"
+/*  1493 */ "priority\0"
+/*  1502 */ "DH params file to use\0"
+/*  1524 */ "DHPARAMS\0"
+/*  1533 */ "dhparams\0"
+/*  1542 */ "Certificate file or PKCS #11 URL to use\0"
+/*  1582 */ "X509CAFILE\0"
+/*  1593 */ "x509cafile\0"
+/*  1604 */ "CRL file to use\0"
+/*  1620 */ "X509CRLFILE\0"
+/*  1632 */ "x509crlfile\0"
+/*  1644 */ "PGP Key file to use\0"
+/*  1664 */ "PGPKEYFILE\0"
+/*  1675 */ "pgpkeyfile\0"
+/*  1686 */ "PGP Key ring file to use\0"
+/*  1711 */ "PGPKEYRING\0"
+/*  1722 */ "pgpkeyring\0"
+/*  1733 */ "PGP Public Key (certificate) file to use\0"
+/*  1774 */ "PGPCERTFILE\0"
+/*  1786 */ "pgpcertfile\0"
+/*  1798 */ "X.509 key file or PKCS #11 URL to use\0"
+/*  1836 */ "X509KEYFILE\0"
+/*  1848 */ "x509keyfile\0"
+/*  1860 */ "X.509 Certificate file or PKCS #11 URL to use\0"
+/*  1906 */ "X509CERTFILE\0"
+/*  1919 */ "x509certfile\0"
+/*  1932 */ "Alternative X.509 key file or PKCS #11 URL to use\0"
+/*  1982 */ "X509DSAKEYFILE\0"
+/*  1997 */ "x509dsakeyfile\0"
+/*  2012 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0"
+/*  2070 */ "X509DSACERTFILE\0"
+/*  2086 */ "x509dsacertfile\0"
+/*  2102 */ "X509ECCKEYFILE\0"
+/*  2117 */ "x509ecckeyfile\0"
+/*  2132 */ "X509ECCCERTFILE\0"
+/*  2148 */ "x509ecccertfile\0"
+/*  2164 */ "PGP subkey to use (hex or auto)\0"
+/*  2196 */ "PGPSUBKEY\0"
+/*  2206 */ "pgpsubkey\0"
+/*  2216 */ "SRP password file to use\0"
+/*  2241 */ "SRPPASSWD\0"
+/*  2251 */ "srppasswd\0"
+/*  2261 */ "SRP password configuration file to use\0"
+/*  2300 */ "SRPPASSWDCONF\0"
+/*  2314 */ "srppasswdconf\0"
+/*  2328 */ "PSK password file to use\0"
+/*  2353 */ "PSKPASSWD\0"
+/*  2363 */ "pskpasswd\0"
+/*  2373 */ "PSK identity hint to use\0"
+/*  2398 */ "PSKHINT\0"
+/*  2406 */ "pskhint\0"
+/*  2414 */ "The port to connect to\0"
+/*  2437 */ "PORT\0"
+/*  2442 */ "port\0"
+/*  2447 */ "Print a list of the supported algorithms and modes\0"
+/*  2498 */ "LIST\0"
+/*  2503 */ "list\0"
+/*  2508 */ "Display extended usage information and exit\0"
+/*  2552 */ "help\0"
+/*  2557 */ "Extended usage information passed thru pager\0"
+/*  2602 */ "more-help\0"
+/*  2612 */ "Output version information and exit\0"
+/*  2648 */ "version\0"
+/*  2656 */ "GNUTLS_SERV\0"
+/*  2668 */ "gnutls-serv - GnuTLS server - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/*  2771 */ "address@hidden"
+/*  2790 */ "\n\n\0"
+/*  2793 */ "\n"
+            "Server program that listens to incoming TLS connections.\n\0"
+/*  2852 */ "gnutls-serv @address@hidden"
+/*  2874 */ "Usage: gnutls-serv [options]\n"
+            "gnutls-serv --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (gnutls_serv_opt_strs+893)
+#define DEBUG_NAME      (gnutls_serv_opt_strs+911)
+#define DEBUG_name      (gnutls_serv_opt_strs+917)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  noticket option description:
+ */
+#define NOTICKET_DESC      (gnutls_serv_opt_strs+923)
+#define NOTICKET_NAME      (gnutls_serv_opt_strs+952)
+#define NOTICKET_name      (gnutls_serv_opt_strs+961)
+#define NOTICKET_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  generate option description:
+ */
+#define GENERATE_DESC      (gnutls_serv_opt_strs+970)
+#define GENERATE_NAME      (gnutls_serv_opt_strs+1020)
+#define GENERATE_name      (gnutls_serv_opt_strs+1029)
+#define GENERATE_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  quiet option description:
+ */
+#define QUIET_DESC      (gnutls_serv_opt_strs+1038)
+#define QUIET_NAME      (gnutls_serv_opt_strs+1061)
+#define QUIET_name      (gnutls_serv_opt_strs+1067)
+#define QUIET_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  nodb option description:
+ */
+#define NODB_DESC      (gnutls_serv_opt_strs+1073)
+#define NODB_NAME      (gnutls_serv_opt_strs+1106)
+#define NODB_name      (gnutls_serv_opt_strs+1111)
+#define NODB_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  http option description:
+ */
+#define HTTP_DESC      (gnutls_serv_opt_strs+1116)
+#define HTTP_NAME      (gnutls_serv_opt_strs+1138)
+#define HTTP_name      (gnutls_serv_opt_strs+1143)
+#define HTTP_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  echo option description:
+ */
+#define ECHO_DESC      (gnutls_serv_opt_strs+1148)
+#define ECHO_NAME      (gnutls_serv_opt_strs+1170)
+#define ECHO_name      (gnutls_serv_opt_strs+1175)
+#define ECHO_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  udp option description:
+ */
+#define UDP_DESC      (gnutls_serv_opt_strs+1180)
+#define UDP_NAME      (gnutls_serv_opt_strs+1213)
+#define UDP_name      (gnutls_serv_opt_strs+1217)
+#define UDP_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  mtu option description:
+ */
+#define MTU_DESC      (gnutls_serv_opt_strs+1221)
+#define MTU_NAME      (gnutls_serv_opt_strs+1246)
+#define MTU_name      (gnutls_serv_opt_strs+1250)
+#define MTU_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  disable-client-cert option description:
+ */
+#define DISABLE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1254)
+#define DISABLE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1290)
+#define DISABLE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1310)
+#define DISABLE_CLIENT_CERT_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  require-client-cert option description:
+ */
+#define REQUIRE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1330)
+#define REQUIRE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1359)
+#define REQUIRE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1379)
+#define REQUIRE_CLIENT_CERT_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  x509fmtder option description:
+ */
+#define X509FMTDER_DESC      (gnutls_serv_opt_strs+1399)
+#define X509FMTDER_NAME      (gnutls_serv_opt_strs+1444)
+#define X509FMTDER_name      (gnutls_serv_opt_strs+1455)
+#define X509FMTDER_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  priority option description:
+ */
+#define PRIORITY_DESC      (gnutls_serv_opt_strs+1466)
+#define PRIORITY_NAME      (gnutls_serv_opt_strs+1484)
+#define PRIORITY_name      (gnutls_serv_opt_strs+1493)
+#define PRIORITY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  dhparams option description:
+ */
+#define DHPARAMS_DESC      (gnutls_serv_opt_strs+1502)
+#define DHPARAMS_NAME      (gnutls_serv_opt_strs+1524)
+#define DHPARAMS_name      (gnutls_serv_opt_strs+1533)
+#define DHPARAMS_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  x509cafile option description:
+ */
+#define X509CAFILE_DESC      (gnutls_serv_opt_strs+1542)
+#define X509CAFILE_NAME      (gnutls_serv_opt_strs+1582)
+#define X509CAFILE_name      (gnutls_serv_opt_strs+1593)
+#define X509CAFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509crlfile option description:
+ */
+#define X509CRLFILE_DESC      (gnutls_serv_opt_strs+1604)
+#define X509CRLFILE_NAME      (gnutls_serv_opt_strs+1620)
+#define X509CRLFILE_name      (gnutls_serv_opt_strs+1632)
+#define X509CRLFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpkeyfile option description:
+ */
+#define PGPKEYFILE_DESC      (gnutls_serv_opt_strs+1644)
+#define PGPKEYFILE_NAME      (gnutls_serv_opt_strs+1664)
+#define PGPKEYFILE_name      (gnutls_serv_opt_strs+1675)
+#define PGPKEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpkeyring option description:
+ */
+#define PGPKEYRING_DESC      (gnutls_serv_opt_strs+1686)
+#define PGPKEYRING_NAME      (gnutls_serv_opt_strs+1711)
+#define PGPKEYRING_name      (gnutls_serv_opt_strs+1722)
+#define PGPKEYRING_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pgpcertfile option description:
+ */
+#define PGPCERTFILE_DESC      (gnutls_serv_opt_strs+1733)
+#define PGPCERTFILE_NAME      (gnutls_serv_opt_strs+1774)
+#define PGPCERTFILE_name      (gnutls_serv_opt_strs+1786)
+#define PGPCERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  x509keyfile option description:
+ */
+#define X509KEYFILE_DESC      (gnutls_serv_opt_strs+1798)
+#define X509KEYFILE_NAME      (gnutls_serv_opt_strs+1836)
+#define X509KEYFILE_name      (gnutls_serv_opt_strs+1848)
+#define X509KEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509certfile option description:
+ */
+#define X509CERTFILE_DESC      (gnutls_serv_opt_strs+1860)
+#define X509CERTFILE_NAME      (gnutls_serv_opt_strs+1906)
+#define X509CERTFILE_name      (gnutls_serv_opt_strs+1919)
+#define X509CERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509dsakeyfile option description:
+ */
+#define X509DSAKEYFILE_DESC      (gnutls_serv_opt_strs+1932)
+#define X509DSAKEYFILE_NAME      (gnutls_serv_opt_strs+1982)
+#define X509DSAKEYFILE_name      (gnutls_serv_opt_strs+1997)
+#define X509DSAKEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509dsacertfile option description:
+ */
+#define X509DSACERTFILE_DESC      (gnutls_serv_opt_strs+2012)
+#define X509DSACERTFILE_NAME      (gnutls_serv_opt_strs+2070)
+#define X509DSACERTFILE_name      (gnutls_serv_opt_strs+2086)
+#define X509DSACERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509ecckeyfile option description:
+ */
+#define X509ECCKEYFILE_DESC      (gnutls_serv_opt_strs+1932)
+#define X509ECCKEYFILE_NAME      (gnutls_serv_opt_strs+2102)
+#define X509ECCKEYFILE_name      (gnutls_serv_opt_strs+2117)
+#define X509ECCKEYFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  x509ecccertfile option description:
+ */
+#define X509ECCCERTFILE_DESC      (gnutls_serv_opt_strs+2012)
+#define X509ECCCERTFILE_NAME      (gnutls_serv_opt_strs+2132)
+#define X509ECCCERTFILE_name      (gnutls_serv_opt_strs+2148)
+#define X509ECCCERTFILE_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  pgpsubkey option description:
+ */
+#define PGPSUBKEY_DESC      (gnutls_serv_opt_strs+2164)
+#define PGPSUBKEY_NAME      (gnutls_serv_opt_strs+2196)
+#define PGPSUBKEY_name      (gnutls_serv_opt_strs+2206)
+#define PGPSUBKEY_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  srppasswd option description:
+ */
+#define SRPPASSWD_DESC      (gnutls_serv_opt_strs+2216)
+#define SRPPASSWD_NAME      (gnutls_serv_opt_strs+2241)
+#define SRPPASSWD_name      (gnutls_serv_opt_strs+2251)
+#define SRPPASSWD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  srppasswdconf option description:
+ */
+#define SRPPASSWDCONF_DESC      (gnutls_serv_opt_strs+2261)
+#define SRPPASSWDCONF_NAME      (gnutls_serv_opt_strs+2300)
+#define SRPPASSWDCONF_name      (gnutls_serv_opt_strs+2314)
+#define SRPPASSWDCONF_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pskpasswd option description:
+ */
+#define PSKPASSWD_DESC      (gnutls_serv_opt_strs+2328)
+#define PSKPASSWD_NAME      (gnutls_serv_opt_strs+2353)
+#define PSKPASSWD_name      (gnutls_serv_opt_strs+2363)
+#define PSKPASSWD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
+
+/*
+ *  pskhint option description:
+ */
+#define PSKHINT_DESC      (gnutls_serv_opt_strs+2373)
+#define PSKHINT_NAME      (gnutls_serv_opt_strs+2398)
+#define PSKHINT_name      (gnutls_serv_opt_strs+2406)
+#define PSKHINT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  port option description:
+ */
+#define PORT_DESC      (gnutls_serv_opt_strs+2414)
+#define PORT_NAME      (gnutls_serv_opt_strs+2437)
+#define PORT_name      (gnutls_serv_opt_strs+2442)
+#define PORT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  list option description:
+ */
+#define LIST_DESC      (gnutls_serv_opt_strs+2447)
+#define LIST_NAME      (gnutls_serv_opt_strs+2498)
+#define LIST_name      (gnutls_serv_opt_strs+2503)
+#define LIST_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (gnutls_serv_opt_strs+2508)
+#define HELP_name       (gnutls_serv_opt_strs+2552)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (gnutls_serv_opt_strs+2557)
+#define MORE_HELP_name  (gnutls_serv_opt_strs+2602)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (gnutls_serv_opt_strs+2612)
+#define VER_name        (gnutls_serv_opt_strs+2648)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug,         doOptDhparams,      doOptMtu,
+    doOptPgpcertfile,   doOptPgpkeyfile,    doOptPgpkeyring,
+    doOptPskpasswd,     doOptSrppasswd,     doOptSrppasswdconf,
+    doOptX509crlfile,   doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the gnutls-serv Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the gnutls-serv program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_NOTICKET,
+     /* equiv idx, value */ 1, VALUE_OPT_NOTICKET,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ NOTICKET_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --noticket */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ NOTICKET_DESC, NOTICKET_NAME, NOTICKET_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_GENERATE,
+     /* equiv idx, value */ 2, VALUE_OPT_GENERATE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ GENERATE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --generate */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ GENERATE_DESC, GENERATE_NAME, GENERATE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_QUIET,
+     /* equiv idx, value */ 3, VALUE_OPT_QUIET,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ QUIET_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --quiet */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ QUIET_DESC, QUIET_NAME, QUIET_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_NODB,
+     /* equiv idx, value */ 4, VALUE_OPT_NODB,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ NODB_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --nodb */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ NODB_DESC, NODB_NAME, NODB_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_HTTP,
+     /* equiv idx, value */ 5, VALUE_OPT_HTTP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ HTTP_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --http */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ HTTP_DESC, HTTP_NAME, HTTP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_ECHO,
+     /* equiv idx, value */ 6, VALUE_OPT_ECHO,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ ECHO_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --echo */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ ECHO_DESC, ECHO_NAME, ECHO_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_UDP,
+     /* equiv idx, value */ 7, VALUE_OPT_UDP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ UDP_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --udp */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ UDP_DESC, UDP_NAME, UDP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 8, VALUE_OPT_MTU,
+     /* equiv idx, value */ 8, VALUE_OPT_MTU,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MTU_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --mtu */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptMtu,
+     /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 9, VALUE_OPT_DISABLE_CLIENT_CERT,
+     /* equiv idx, value */ 9, VALUE_OPT_DISABLE_CLIENT_CERT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DISABLE_CLIENT_CERT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --disable-client-cert */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, 
DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_REQUIRE_CLIENT_CERT,
+     /* equiv idx, value */ 10, VALUE_OPT_REQUIRE_CLIENT_CERT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ REQUIRE_CLIENT_CERT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --require-client-cert */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ REQUIRE_CLIENT_CERT_DESC, 
REQUIRE_CLIENT_CERT_NAME, REQUIRE_CLIENT_CERT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 11, VALUE_OPT_X509FMTDER,
+     /* equiv idx, value */ 11, VALUE_OPT_X509FMTDER,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509FMTDER_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509fmtder */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 12, VALUE_OPT_PRIORITY,
+     /* equiv idx, value */ 12, VALUE_OPT_PRIORITY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PRIORITY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --priority */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 13, VALUE_OPT_DHPARAMS,
+     /* equiv idx, value */ 13, VALUE_OPT_DHPARAMS,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DHPARAMS_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --dhparams */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDhparams,
+     /* desc, NAME, name */ DHPARAMS_DESC, DHPARAMS_NAME, DHPARAMS_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 14, VALUE_OPT_X509CAFILE,
+     /* equiv idx, value */ 14, VALUE_OPT_X509CAFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CAFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509cafile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 15, VALUE_OPT_X509CRLFILE,
+     /* equiv idx, value */ 15, VALUE_OPT_X509CRLFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CRLFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509crlfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptX509crlfile,
+     /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, 
X509CRLFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_PGPKEYFILE,
+     /* equiv idx, value */ 16, VALUE_OPT_PGPKEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPKEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpkeyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpkeyfile,
+     /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 17, VALUE_OPT_PGPKEYRING,
+     /* equiv idx, value */ 17, VALUE_OPT_PGPKEYRING,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPKEYRING_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpkeyring */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpkeyring,
+     /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 18, VALUE_OPT_PGPCERTFILE,
+     /* equiv idx, value */ 18, VALUE_OPT_PGPCERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPCERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpcertfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPgpcertfile,
+     /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, 
PGPCERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 19, VALUE_OPT_X509KEYFILE,
+     /* equiv idx, value */ 19, VALUE_OPT_X509KEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509KEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509keyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, 
X509KEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 20, VALUE_OPT_X509CERTFILE,
+     /* equiv idx, value */ 20, VALUE_OPT_X509CERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509CERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509certfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, 
X509CERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 21, VALUE_OPT_X509DSAKEYFILE,
+     /* equiv idx, value */ 21, VALUE_OPT_X509DSAKEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509DSAKEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509dsakeyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, 
X509DSAKEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 22, VALUE_OPT_X509DSACERTFILE,
+     /* equiv idx, value */ 22, VALUE_OPT_X509DSACERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509DSACERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509dsacertfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, 
X509DSACERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 23, VALUE_OPT_X509ECCKEYFILE,
+     /* equiv idx, value */ 23, VALUE_OPT_X509ECCKEYFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509ECCKEYFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509ecckeyfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, 
X509ECCKEYFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 24, VALUE_OPT_X509ECCCERTFILE,
+     /* equiv idx, value */ 24, VALUE_OPT_X509ECCCERTFILE,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ X509ECCCERTFILE_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --x509ecccertfile */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, 
X509ECCCERTFILE_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 25, VALUE_OPT_PGPSUBKEY,
+     /* equiv idx, value */ 25, VALUE_OPT_PGPSUBKEY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PGPSUBKEY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pgpsubkey */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 26, VALUE_OPT_SRPPASSWD,
+     /* equiv idx, value */ 26, VALUE_OPT_SRPPASSWD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRPPASSWD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srppasswd */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptSrppasswd,
+     /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 27, VALUE_OPT_SRPPASSWDCONF,
+     /* equiv idx, value */ 27, VALUE_OPT_SRPPASSWDCONF,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRPPASSWDCONF_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srppasswdconf */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptSrppasswdconf,
+     /* desc, NAME, name */ SRPPASSWDCONF_DESC, SRPPASSWDCONF_NAME, 
SRPPASSWDCONF_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 28, VALUE_OPT_PSKPASSWD,
+     /* equiv idx, value */ 28, VALUE_OPT_PSKPASSWD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PSKPASSWD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pskpasswd */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptPskpasswd,
+     /* desc, NAME, name */ PSKPASSWD_DESC, PSKPASSWD_NAME, PSKPASSWD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 29, VALUE_OPT_PSKHINT,
+     /* equiv idx, value */ 29, VALUE_OPT_PSKHINT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PSKHINT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --pskhint */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PSKHINT_DESC, PSKHINT_NAME, PSKHINT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 30, VALUE_OPT_PORT,
+     /* equiv idx, value */ 30, VALUE_OPT_PORT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PORT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --port */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ optionNumericVal,
+     /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 31, VALUE_OPT_LIST,
+     /* equiv idx, value */ 31, VALUE_OPT_LIST,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ LIST_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --list */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ LIST_DESC, LIST_NAME, LIST_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the gnutls-serv Option Environment
+ */
+#define zPROGNAME       (gnutls_serv_opt_strs+2656)
+#define zUsageTitle     (gnutls_serv_opt_strs+2668)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (gnutls_serv_opt_strs+2771)
+#define zExplain        (gnutls_serv_opt_strs+2790)
+#define zDetail         (gnutls_serv_opt_strs+2793)
+#define zFullVersion    (gnutls_serv_opt_strs+2852)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define gnutls_serv_full_usage (NULL)
+
+#define gnutls_serv_short_usage (gnutls_serv_opt_strs+2874)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&gnutls_servOptions, GNUTLS_SERV_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the mtu option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptMtu(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0, 17000 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the dhparams option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDhparams(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the x509crlfile option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptX509crlfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpkeyfile option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpkeyfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpkeyring option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpkeyring(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pgpcertfile option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPgpcertfile(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the srppasswd option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptSrppasswd(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the srppasswdconf option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptSrppasswdconf(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the pskpasswd option.
+ *
+ * @param pOptions the gnutls-serv options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptPskpasswd(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static teOptFileType const  type =
+        FTYPE_MODE_MUST_EXIST + FTYPE_MODE_NO_OPEN;
+    static tuFileMode           mode;
+#ifndef O_CLOEXEC
+#  define O_CLOEXEC 0
+#endif
+    mode.file_flags = O_CLOEXEC;
+
+    optionFileCheck(pOptions, pOptDesc, type, mode);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with gnutls-serv.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged gnutls-serv
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define gnutls_serv_packager_info NULL
+#else
+static char const gnutls_serv_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport gnutls_serv bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for gnutls-serv.  The one structure that
+ * binds them all.
+ */
+tOptions gnutls_servOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NO_ARGS
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    35 /* full option count */, 32 /* user option count */,
+    gnutls_serv_full_usage, gnutls_serv_short_usage,
+    NULL, NULL,
+    PKGDATADIR, gnutls_serv_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(GNUTLS_SERV_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the gnutls_servOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &gnutls_servOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        gnutls_servOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | 
OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* serv-args.c ends here */
diff --git a/src/serv-args.h b/src/serv-args.h
new file mode 100644
index 0000000..a9c930e
--- /dev/null
+++ b/src/serv-args.h
@@ -0,0 +1,249 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (serv-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:44 PM by AutoGen 5.16
+ *  From the definitions    serv-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the gnutls-serv author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The gnutls-serv program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  gnutls-serv is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  gnutls-serv is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the gnutls-serv program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_SERV_ARGS_H_GUARD
+#define AUTOOPTS_SERV_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG                =  0,
+    INDEX_OPT_NOTICKET             =  1,
+    INDEX_OPT_GENERATE             =  2,
+    INDEX_OPT_QUIET                =  3,
+    INDEX_OPT_NODB                 =  4,
+    INDEX_OPT_HTTP                 =  5,
+    INDEX_OPT_ECHO                 =  6,
+    INDEX_OPT_UDP                  =  7,
+    INDEX_OPT_MTU                  =  8,
+    INDEX_OPT_DISABLE_CLIENT_CERT  =  9,
+    INDEX_OPT_REQUIRE_CLIENT_CERT  = 10,
+    INDEX_OPT_X509FMTDER           = 11,
+    INDEX_OPT_PRIORITY             = 12,
+    INDEX_OPT_DHPARAMS             = 13,
+    INDEX_OPT_X509CAFILE           = 14,
+    INDEX_OPT_X509CRLFILE          = 15,
+    INDEX_OPT_PGPKEYFILE           = 16,
+    INDEX_OPT_PGPKEYRING           = 17,
+    INDEX_OPT_PGPCERTFILE          = 18,
+    INDEX_OPT_X509KEYFILE          = 19,
+    INDEX_OPT_X509CERTFILE         = 20,
+    INDEX_OPT_X509DSAKEYFILE       = 21,
+    INDEX_OPT_X509DSACERTFILE      = 22,
+    INDEX_OPT_X509ECCKEYFILE       = 23,
+    INDEX_OPT_X509ECCCERTFILE      = 24,
+    INDEX_OPT_PGPSUBKEY            = 25,
+    INDEX_OPT_SRPPASSWD            = 26,
+    INDEX_OPT_SRPPASSWDCONF        = 27,
+    INDEX_OPT_PSKPASSWD            = 28,
+    INDEX_OPT_PSKHINT              = 29,
+    INDEX_OPT_PORT                 = 30,
+    INDEX_OPT_LIST                 = 31,
+    INDEX_OPT_VERSION              = 32,
+    INDEX_OPT_HELP                 = 33,
+    INDEX_OPT_MORE_HELP            = 34
+} teOptIndex;
+
+#define OPTION_CT    35
+#define GNUTLS_SERV_VERSION       "@VERSION@"
+#define GNUTLS_SERV_FULL_VERSION  "gnutls-serv @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (gnutls_servOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of gnutls-serv exit codes
+ */
+typedef enum {
+    GNUTLS_SERV_EXIT_SUCCESS = 0,
+    GNUTLS_SERV_EXIT_FAILURE = 1,
+    GNUTLS_SERV_EXIT_LIBOPTS_FAILURE = 70
+} gnutls_serv_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_NOTICKET       1
+#define VALUE_OPT_GENERATE       'g'
+#define VALUE_OPT_QUIET          'q'
+#define VALUE_OPT_NODB           4
+#define VALUE_OPT_HTTP           5
+#define VALUE_OPT_ECHO           6
+#define VALUE_OPT_UDP            'u'
+#define VALUE_OPT_MTU            8
+
+#define OPT_VALUE_MTU            (DESC(MTU).optArg.argInt)
+#define VALUE_OPT_DISABLE_CLIENT_CERT 'a'
+#define VALUE_OPT_REQUIRE_CLIENT_CERT 'r'
+#define VALUE_OPT_X509FMTDER     11
+#define VALUE_OPT_PRIORITY       12
+#define VALUE_OPT_DHPARAMS       13
+#define VALUE_OPT_X509CAFILE     14
+#define VALUE_OPT_X509CRLFILE    15
+#define VALUE_OPT_PGPKEYFILE     16
+#define VALUE_OPT_PGPKEYRING     17
+#define VALUE_OPT_PGPCERTFILE    18
+#define VALUE_OPT_X509KEYFILE    19
+#define VALUE_OPT_X509CERTFILE   20
+#define VALUE_OPT_X509DSAKEYFILE 21
+#define VALUE_OPT_X509DSACERTFILE 22
+#define VALUE_OPT_X509ECCKEYFILE 23
+#define VALUE_OPT_X509ECCCERTFILE 24
+#define VALUE_OPT_PGPSUBKEY      25
+#define VALUE_OPT_SRPPASSWD      26
+#define VALUE_OPT_SRPPASSWDCONF  27
+#define VALUE_OPT_PSKPASSWD      28
+#define VALUE_OPT_PSKHINT        29
+#define VALUE_OPT_PORT           'p'
+
+#define OPT_VALUE_PORT           (DESC(PORT).optArg.argInt)
+#define VALUE_OPT_LIST           'l'
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(gnutls_servOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(gnutls_servOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                gnutls_servOptions.curOptIdx = (n); \
+                gnutls_servOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*gnutls_servOptions.pUsageProc)(&gnutls_servOptions, 
c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the gnutls-serv option descriptor.
+ */
+extern tOptions gnutls_servOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(gnutls_servOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(gnutls_servOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(gnutls_servOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(gnutls_servOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_SERV_ARGS_H_GUARD */
+/* serv-args.h ends here */
diff --git a/src/srptool-args.c b/src/srptool-args.c
new file mode 100644
index 0000000..9e31a59
--- /dev/null
+++ b/src/srptool-args.c
@@ -0,0 +1,631 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (srptool-args.c)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:44 PM by AutoGen 5.16
+ *  From the definitions    srptool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This source file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the srptool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The srptool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  srptool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  srptool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __doxygen__
+#define OPTION_CODE_COMPILE 1
+#include "srptool-args.h"
+#include <sys/types.h>
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+extern FILE * option_usage_fp;
+
+/* TRANSLATORS: choose the translation for option names wisely because you
+                cannot ever change your mind. */
+#define zCopyright      (srptool_opt_strs+0)
+#define zLicenseDescrip (srptool_opt_strs+278)
+
+
+#ifndef NULL
+#  define NULL 0
+#endif
+
+/*
+ *  srptool option static const strings
+ */
+static char const srptool_opt_strs[2049] =
+/*     0 */ "srptool @address@hidden"
+            "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
+            "This is free software. It is licensed for use, modification and\n"
+            "redistribution under the terms of the\n"
+            "GNU General Public License, version 3 or later\n"
+            "    <http://gnu.org/licenses/gpl.html>\n\0"
+/*   278 */ "srptool is free software: you can redistribute it and/or modify 
it under\n"
+            "the terms of the GNU General Public License as published by the 
Free\n"
+            "Software Foundation, either version 3 of the License, or (at your 
option)\n"
+            "any later version.\n\n"
+            "srptool is distributed in the hope that it will be useful, but 
WITHOUT ANY\n"
+            "WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS\n"
+            "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
more\n"
+            "details.\n\n"
+            "You should have received a copy of the GNU General Public License 
along\n"
+            "with this program.  If not, see 
<http://www.gnu.org/licenses/>.\n\0"
+/*   881 */ "Enable debugging.\0"
+/*   899 */ "DEBUG\0"
+/*   905 */ "debug\0"
+/*   911 */ "specify the index of the group parameters in tpasswd.conf to 
use.\0"
+/*   977 */ "INDEX\0"
+/*   983 */ "index\0"
+/*   989 */ "specify a username\0"
+/*  1008 */ "USERNAME\0"
+/*  1017 */ "username\0"
+/*  1026 */ "specify a password file.\0"
+/*  1051 */ "PASSWD\0"
+/*  1058 */ "passwd\0"
+/*  1065 */ "specify salt size.\0"
+/*  1084 */ "SALT\0"
+/*  1089 */ "salt\0"
+/*  1094 */ "just verify the password.\0"
+/*  1120 */ "VERIFY\0"
+/*  1127 */ "verify\0"
+/*  1134 */ "specify a password conf file.\0"
+/*  1164 */ "PASSWD_CONF\0"
+/*  1176 */ "passwd-conf\0"
+/*  1188 */ "Generate a password configuration file.\0"
+/*  1228 */ "CREATE_CONF\0"
+/*  1240 */ "create-conf\0"
+/*  1252 */ "Display extended usage information and exit\0"
+/*  1296 */ "help\0"
+/*  1301 */ "Extended usage information passed thru pager\0"
+/*  1346 */ "more-help\0"
+/*  1356 */ "Output version information and exit\0"
+/*  1392 */ "version\0"
+/*  1400 */ "SRPTOOL\0"
+/*  1408 */ "srptool - GnuTLS SRP tool - Ver. @address@hidden"
+            "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
+/*  1509 */ "address@hidden"
+/*  1528 */ "\n\n\0"
+/*  1531 */ "\n"
+            "Simple program that emulates the programs in the Stanford SRP 
(Secure\n"
+            "Remote Password) libraries using GnuTLS.  It is intended for use 
in places\n"
+            "where you don't expect SRP authentication to be the used for 
system users.\n\n"
+            "In brief, to use SRP you need to create two files.  These are the 
password\n"
+            "file that holds the users and the verifiers associated with them 
and the\n"
+            "configuration file to hold the group parameters (called 
tpasswd.conf).\n\0"
+/*  1973 */ "srptool @address@hidden"
+/*  1991 */ "srptool [options]\n"
+            "srptool --help for usage instructions.\n";
+
+/*
+ *  debug option description:
+ */
+#define DEBUG_DESC      (srptool_opt_strs+881)
+#define DEBUG_NAME      (srptool_opt_strs+899)
+#define DEBUG_name      (srptool_opt_strs+905)
+#define DEBUG_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  index option description:
+ */
+#define INDEX_DESC      (srptool_opt_strs+911)
+#define INDEX_NAME      (srptool_opt_strs+977)
+#define INDEX_name      (srptool_opt_strs+983)
+#define INDEX_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  username option description:
+ */
+#define USERNAME_DESC      (srptool_opt_strs+989)
+#define USERNAME_NAME      (srptool_opt_strs+1008)
+#define USERNAME_name      (srptool_opt_strs+1017)
+#define USERNAME_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  passwd option description:
+ */
+#define PASSWD_DESC      (srptool_opt_strs+1026)
+#define PASSWD_NAME      (srptool_opt_strs+1051)
+#define PASSWD_name      (srptool_opt_strs+1058)
+#define PASSWD_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  salt option description:
+ */
+#define SALT_DESC      (srptool_opt_strs+1065)
+#define SALT_NAME      (srptool_opt_strs+1084)
+#define SALT_name      (srptool_opt_strs+1089)
+#define SALT_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
+
+/*
+ *  verify option description:
+ */
+#define VERIFY_DESC      (srptool_opt_strs+1094)
+#define VERIFY_NAME      (srptool_opt_strs+1120)
+#define VERIFY_name      (srptool_opt_strs+1127)
+#define VERIFY_FLAGS     (OPTST_DISABLED)
+
+/*
+ *  passwd-conf option description:
+ */
+#define PASSWD_CONF_DESC      (srptool_opt_strs+1134)
+#define PASSWD_CONF_NAME      (srptool_opt_strs+1164)
+#define PASSWD_CONF_name      (srptool_opt_strs+1176)
+#define PASSWD_CONF_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  create-conf option description:
+ */
+#define CREATE_CONF_DESC      (srptool_opt_strs+1188)
+#define CREATE_CONF_NAME      (srptool_opt_strs+1228)
+#define CREATE_CONF_name      (srptool_opt_strs+1240)
+#define CREATE_CONF_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
+ *  Help/More_Help/Version option descriptions:
+ */
+#define HELP_DESC       (srptool_opt_strs+1252)
+#define HELP_name       (srptool_opt_strs+1296)
+#ifdef HAVE_WORKING_FORK
+#define MORE_HELP_DESC  (srptool_opt_strs+1301)
+#define MORE_HELP_name  (srptool_opt_strs+1346)
+#define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
+#else
+#define MORE_HELP_DESC  NULL
+#define MORE_HELP_name  NULL
+#define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
+#endif
+#ifdef NO_OPTIONAL_OPT_ARGS
+#  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
+#else
+#  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
+                         OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
+#endif
+#define VER_DESC        (srptool_opt_strs+1356)
+#define VER_name        (srptool_opt_strs+1392)
+/*
+ *  Declare option callback procedures
+ */
+extern tOptProc
+    optionBooleanVal,   optionNestedVal,    optionNumericVal,
+    optionPagedUsage,   optionPrintVersion, optionResetOpt,
+    optionStackArg,     optionTimeDate,     optionTimeVal,
+    optionUnstackArg,   optionVendorOption;
+static tOptProc
+    doOptDebug, doUsageOpt;
+#define VER_PROC        optionPrintVersion
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ *  Define the srptool Option Descriptions.
+ * This is an array of OPTION_CT entries, one for each
+ * option that the srptool program responds to.
+ */
+static tOptDesc optDesc[OPTION_CT] = {
+  {  /* entry idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equiv idx, value */ 0, VALUE_OPT_DEBUG,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ DEBUG_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --debug */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doOptDebug,
+     /* desc, NAME, name */ DEBUG_DESC, DEBUG_NAME, DEBUG_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 1, VALUE_OPT_INDEX,
+     /* equiv idx, value */ 1, VALUE_OPT_INDEX,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ INDEX_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --index */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ INDEX_DESC, INDEX_NAME, INDEX_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 2, VALUE_OPT_USERNAME,
+     /* equiv idx, value */ 2, VALUE_OPT_USERNAME,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ USERNAME_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --username */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ USERNAME_DESC, USERNAME_NAME, USERNAME_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 3, VALUE_OPT_PASSWD,
+     /* equiv idx, value */ 3, VALUE_OPT_PASSWD,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PASSWD_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --passwd */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PASSWD_DESC, PASSWD_NAME, PASSWD_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 4, VALUE_OPT_SALT,
+     /* equiv idx, value */ 4, VALUE_OPT_SALT,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SALT_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --salt */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ optionNumericVal,
+     /* desc, NAME, name */ SALT_DESC, SALT_NAME, SALT_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 5, VALUE_OPT_VERIFY,
+     /* equiv idx, value */ 5, VALUE_OPT_VERIFY,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VERIFY_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --verify */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ VERIFY_DESC, VERIFY_NAME, VERIFY_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 6, VALUE_OPT_PASSWD_CONF,
+     /* equiv idx, value */ 6, VALUE_OPT_PASSWD_CONF,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ PASSWD_CONF_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --passwd-conf */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ PASSWD_CONF_DESC, PASSWD_CONF_NAME, 
PASSWD_CONF_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 7, VALUE_OPT_CREATE_CONF,
+     /* equiv idx, value */ 7, VALUE_OPT_CREATE_CONF,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ CREATE_CONF_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --create-conf */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ CREATE_CONF_DESC, CREATE_CONF_NAME, 
CREATE_CONF_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ VER_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ VER_PROC,
+     /* desc, NAME, name */ VER_DESC, NULL, VER_name,
+     /* disablement strs */ NULL, NULL },
+
+
+
+  {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ doUsageOpt,
+     /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
+     /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ MORE_HELP_FLAGS, 0,
+     /* last opt argumnt */ { NULL },
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL,  NULL,
+     /* option proc      */ optionPagedUsage,
+     /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
+     /* disablement strs */ NULL, NULL }
+};
+
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Define the srptool Option Environment
+ */
+#define zPROGNAME       (srptool_opt_strs+1400)
+#define zUsageTitle     (srptool_opt_strs+1408)
+#define zRcName         NULL
+#define apzHomeList     NULL
+#define zBugsAddr       (srptool_opt_strs+1509)
+#define zExplain        (srptool_opt_strs+1528)
+#define zDetail         (srptool_opt_strs+1531)
+#define zFullVersion    (srptool_opt_strs+1973)
+/* extracted from optcode.tlib near line 350 */
+
+#if defined(ENABLE_NLS)
+# define OPTPROC_BASE OPTPROC_TRANSLATE | OPTPROC_NXLAT_OPT
+  static tOptionXlateProc translate_option_strings;
+#else
+# define OPTPROC_BASE OPTPROC_NONE
+# define translate_option_strings NULL
+#endif /* ENABLE_NLS */
+
+
+#define srptool_full_usage (NULL)
+
+#define srptool_short_usage (srptool_opt_strs+1991)
+
+#endif /* not defined __doxygen__ */
+
+/*
+ *  Create the static procedure(s) declared above.
+ */
+/**
+ * The callout function that invokes the optionUsage function.
+ *
+ * @param pOptions the AutoOpts option description structure
+ * @param pOptDesc the descriptor for the "help" (usage) option.
+ * @noreturn
+ */
+static void
+doUsageOpt(tOptions * pOptions, tOptDesc * pOptDesc)
+{
+    optionUsage(&srptoolOptions, SRPTOOL_EXIT_SUCCESS);
+    /* NOTREACHED */
+    (void)pOptDesc;
+    (void)pOptions;
+}
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/**
+ * Code to handle the debug option.
+ *
+ * @param pOptions the srptool options data structure
+ * @param pOptDesc the option descriptor for this option.
+ */
+static void
+doOptDebug(tOptions* pOptions, tOptDesc* pOptDesc)
+{
+    static struct {long rmin, rmax;} const rng[1] = {
+        { 0 ,  9999 } };
+    int  ix;
+
+    if (pOptions <= OPTPROC_EMIT_LIMIT)
+        goto emit_ranges;
+    optionNumericVal(pOptions, pOptDesc);
+
+    for (ix = 0; ix < 1; ix++) {
+        if (pOptDesc->optArg.argInt < rng[ix].rmin)
+            continue;  /* ranges need not be ordered. */
+        if (pOptDesc->optArg.argInt == rng[ix].rmin)
+            return;
+        if (rng[ix].rmax == LONG_MIN)
+            continue;
+        if (pOptDesc->optArg.argInt <= rng[ix].rmax)
+            return;
+    }
+
+    option_usage_fp = stderr;
+
+emit_ranges:
+
+    optionShowRange(pOptions, pOptDesc, (void *)rng, 1);
+}
+/* extracted from optmain.tlib near line 1113 */
+
+/**
+ * The directory containing the data associated with srptool.
+ */
+#ifndef  PKGDATADIR
+# define PKGDATADIR ""
+#endif
+
+/**
+ * Information about the person or institution that packaged srptool
+ * for the current distribution.
+ */
+#ifndef  WITH_PACKAGER
+# define srptool_packager_info NULL
+#else
+static char const srptool_packager_info[] =
+    "Packaged by " WITH_PACKAGER
+
+# ifdef WITH_PACKAGER_VERSION
+        " ("WITH_PACKAGER_VERSION")"
+# endif
+
+# ifdef WITH_PACKAGER_BUG_REPORTS
+    "\nReport srptool bugs to " WITH_PACKAGER_BUG_REPORTS
+# endif
+    "\n";
+#endif
+#ifndef __doxygen__
+
+#endif /* __doxygen__ */
+/**
+ * The option definitions for srptool.  The one structure that
+ * binds them all.
+ */
+tOptions srptoolOptions = {
+    OPTIONS_STRUCT_VERSION,
+    0, NULL,                    /* original argc + argv    */
+    ( OPTPROC_BASE
+    + OPTPROC_ERRSTOP
+    + OPTPROC_SHORTOPT
+    + OPTPROC_LONGOPT
+    + OPTPROC_NO_REQ_OPT
+    + OPTPROC_NO_ARGS
+    + OPTPROC_GNUUSAGE
+    + OPTPROC_MISUSE ),
+    0, NULL,                    /* current option index, current option */
+    NULL,         NULL,         zPROGNAME,
+    zRcName,      zCopyright,   zLicenseDescrip,
+    zFullVersion, apzHomeList,  zUsageTitle,
+    zExplain,     zDetail,      optDesc,
+    zBugsAddr,                  /* address to send bugs to */
+    NULL, NULL,                 /* extensions/saved state  */
+    optionUsage, /* usage procedure */
+    translate_option_strings,   /* translation procedure */
+    /*
+     *  Indexes to special options
+     */
+    { INDEX_OPT_MORE_HELP, /* more-help option index */
+      NO_EQUIVALENT, /* save option index */
+      NO_EQUIVALENT, /* '-#' option index */
+      NO_EQUIVALENT /* index of default opt */
+    },
+    11 /* full option count */, 8 /* user option count */,
+    srptool_full_usage, srptool_short_usage,
+    NULL, NULL,
+    PKGDATADIR, srptool_packager_info
+};
+
+#if ENABLE_NLS
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <autoopts/usage-txt.h>
+
+static char* AO_gettext(char const* pz);
+static void  coerce_it(void** s);
+
+/**
+ * AutoGen specific wrapper function for gettext.
+ * It relies on the macro _() to convert from English to the target
+ * language, then strdup-duplicates the result string.
+ *
+ * @param[in] pz the input text used as a lookup key.
+ * @returns the translated text (if there is one),
+ *   or the original text (if not).
+ */
+static char *
+AO_gettext(char const* pz)
+{
+    char* pzRes;
+    if (pz == NULL)
+        return NULL;
+    pzRes = _(pz);
+    if (pzRes == pz)
+        return pzRes;
+    pzRes = strdup(pzRes);
+    if (pzRes == NULL) {
+        fputs(_("No memory for duping translated strings\n"), stderr);
+        exit(SRPTOOL_EXIT_FAILURE);
+    }
+    return pzRes;
+}
+
+static void coerce_it(void** s) { *s = AO_gettext(*s);
+}
+
+/**
+ * Translate all the translatable strings in the srptoolOptions
+ * structure defined above.  This is done only once.
+ */
+static void
+translate_option_strings(void)
+{
+    tOptions * const pOpt = &srptoolOptions;
+
+    /*
+     *  Guard against re-translation.  It won't work.  The strings will have
+     *  been changed by the first pass through this code.  One shot only.
+     */
+    if (option_usage_text.field_ct != 0) {
+        /*
+         *  Do the translations.  The first pointer follows the field count
+         *  field.  The field count field is the size of a pointer.
+         */
+        tOptDesc * pOD = pOpt->pOptDesc;
+        char **    ppz = (char**)(void*)&(option_usage_text);
+        int        ix  = option_usage_text.field_ct;
+
+        do {
+            ppz++;
+            *ppz = AO_gettext(*ppz);
+        } while (--ix > 0);
+
+        coerce_it((void*)&(pOpt->pzCopyright));
+        coerce_it((void*)&(pOpt->pzCopyNotice));
+        coerce_it((void*)&(pOpt->pzFullVersion));
+        coerce_it((void*)&(pOpt->pzUsageTitle));
+        coerce_it((void*)&(pOpt->pzExplain));
+        coerce_it((void*)&(pOpt->pzDetail));
+        coerce_it((void*)&(pOpt->pzPackager));
+        coerce_it((void*)&(pOpt->pzShortUsage));
+        option_usage_text.field_ct = 0;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++)
+            coerce_it((void*)&(pOD->pzText));
+    }
+
+    if ((pOpt->fOptSet & OPTPROC_NXLAT_OPT_CFG) == 0) {
+        tOptDesc * pOD = pOpt->pOptDesc;
+        int        ix;
+
+        for (ix = pOpt->optCt; ix > 0; ix--, pOD++) {
+            coerce_it((void*)&(pOD->pz_Name));
+            coerce_it((void*)&(pOD->pz_DisableName));
+            coerce_it((void*)&(pOD->pz_DisablePfx));
+        }
+        /* prevent re-translation */
+        srptoolOptions.fOptSet |= OPTPROC_NXLAT_OPT_CFG | OPTPROC_NXLAT_OPT;
+    }
+}
+
+#endif /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+/* srptool-args.c ends here */
diff --git a/src/srptool-args.h b/src/srptool-args.h
new file mode 100644
index 0000000..95a9da0
--- /dev/null
+++ b/src/srptool-args.h
@@ -0,0 +1,199 @@
+/*   -*- buffer-read-only: t -*- vi: set ro:
+ *  
+ *  DO NOT EDIT THIS FILE   (srptool-args.h)
+ *  
+ *  It has been AutoGen-ed  May  9, 2012 at 08:04:44 PM by AutoGen 5.16
+ *  From the definitions    srptool-args.def
+ *  and the template file   options
+ *
+ * Generated from AutoOpts 36:4:11 templates.
+ *
+ *  AutoOpts is a copyrighted work.  This header file is not encumbered
+ *  by AutoOpts licensing, but is provided under the licensing terms chosen
+ *  by the srptool author or copyright holder.  AutoOpts is
+ *  licensed under the terms of the LGPL.  The redistributable library
+ *  (``libopts'') is licensed under the terms of either the LGPL or, at the
+ *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
+ *  for details.
+ *
+ * The srptool program is copyrighted and licensed
+ * under the following terms:
+ *
+ *  Copyright (C) 2000-2012 Free Software Foundation, all rights reserved.
+ *  This is free software. It is licensed for use, modification and
+ *  redistribution under the terms of the
+ *  GNU General Public License, version 3 or later
+ *      <http://gnu.org/licenses/gpl.html>
+ *
+ *  srptool is free software: you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License as published by the
+ *  Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  srptool is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *  See the GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+/*
+ *  This file contains the programmatic interface to the Automated
+ *  Options generated for the srptool program.
+ *  These macros are documented in the AutoGen info file in the
+ *  "AutoOpts" chapter.  Please refer to that doc for usage help.
+ */
+#ifndef AUTOOPTS_SRPTOOL_ARGS_H_GUARD
+#define AUTOOPTS_SRPTOOL_ARGS_H_GUARD 1
+#include "config.h"
+#include <autoopts/options.h>
+
+/*
+ *  Ensure that the library used for compiling this generated header is at
+ *  least as new as the version current when the header template was released
+ *  (not counting patch version increments).  Also ensure that the oldest
+ *  tolerable version is at least as old as what was current when the header
+ *  template was released.
+ */
+#define AO_TEMPLATE_VERSION 147460
+#if (AO_TEMPLATE_VERSION < OPTIONS_MINIMUM_VERSION) \
+ || (AO_TEMPLATE_VERSION > OPTIONS_STRUCT_VERSION)
+# error option template version mismatches autoopts/options.h header
+  Choke Me.
+#endif
+
+/*
+ *  Enumeration of each option:
+ */
+typedef enum {
+    INDEX_OPT_DEBUG        =  0,
+    INDEX_OPT_INDEX        =  1,
+    INDEX_OPT_USERNAME     =  2,
+    INDEX_OPT_PASSWD       =  3,
+    INDEX_OPT_SALT         =  4,
+    INDEX_OPT_VERIFY       =  5,
+    INDEX_OPT_PASSWD_CONF  =  6,
+    INDEX_OPT_CREATE_CONF  =  7,
+    INDEX_OPT_VERSION      =  8,
+    INDEX_OPT_HELP         =  9,
+    INDEX_OPT_MORE_HELP    = 10
+} teOptIndex;
+
+#define OPTION_CT    11
+#define SRPTOOL_VERSION       "@VERSION@"
+#define SRPTOOL_FULL_VERSION  "srptool @VERSION@"
+
+/*
+ *  Interface defines for all options.  Replace "n" with the UPPER_CASED
+ *  option name (as in the teOptIndex enumeration above).
+ *  e.g. HAVE_OPT(DEBUG)
+ */
+#define         DESC(n) (srptoolOptions.pOptDesc[INDEX_OPT_## n])
+#define     HAVE_OPT(n) (! UNUSED_OPT(& DESC(n)))
+#define      OPT_ARG(n) (DESC(n).optArg.argString)
+#define    STATE_OPT(n) (DESC(n).fOptState & OPTST_SET_MASK)
+#define    COUNT_OPT(n) (DESC(n).optOccCt)
+#define    ISSEL_OPT(n) (SELECTED_OPT(&DESC(n)))
+#define ISUNUSED_OPT(n) (UNUSED_OPT(& DESC(n)))
+#define  ENABLED_OPT(n) (! DISABLED_OPT(& DESC(n)))
+#define  STACKCT_OPT(n) (((tArgList*)(DESC(n).optCookie))->useCt)
+#define STACKLST_OPT(n) (((tArgList*)(DESC(n).optCookie))->apzArgs)
+#define    CLEAR_OPT(n) STMTS( \
+                DESC(n).fOptState &= OPTST_PERSISTENT_MASK;   \
+                if ((DESC(n).fOptState & OPTST_INITENABLED) == 0) \
+                    DESC(n).fOptState |= OPTST_DISABLED; \
+                DESC(n).optCookie = NULL )
+
+/* * * * * *
+ *
+ *  Enumeration of srptool exit codes
+ */
+typedef enum {
+    SRPTOOL_EXIT_SUCCESS = 0,
+    SRPTOOL_EXIT_FAILURE = 1,
+    SRPTOOL_EXIT_LIBOPTS_FAILURE = 70
+} srptool_exit_code_t;
+/* * * * * *
+ *
+ *  Interface defines for specific options.
+ */
+#define VALUE_OPT_DEBUG          'd'
+
+#define OPT_VALUE_DEBUG          (DESC(DEBUG).optArg.argInt)
+#define VALUE_OPT_INDEX          'i'
+#define VALUE_OPT_USERNAME       'u'
+#define VALUE_OPT_PASSWD         'p'
+#define VALUE_OPT_SALT           's'
+
+#define OPT_VALUE_SALT           (DESC(SALT).optArg.argInt)
+#define VALUE_OPT_VERIFY         5
+#define VALUE_OPT_PASSWD_CONF    'v'
+#define VALUE_OPT_CREATE_CONF    7
+#define VALUE_OPT_HELP          'h'
+#define VALUE_OPT_MORE_HELP     '!'
+#define VALUE_OPT_VERSION       'v'
+/*
+ *  Interface defines not associated with particular options
+ */
+#define ERRSKIP_OPTERR  STMTS(srptoolOptions.fOptSet &= ~OPTPROC_ERRSTOP)
+#define ERRSTOP_OPTERR  STMTS(srptoolOptions.fOptSet |= OPTPROC_ERRSTOP)
+#define RESTART_OPT(n)  STMTS( \
+                srptoolOptions.curOptIdx = (n); \
+                srptoolOptions.pzCurOpt  = NULL)
+#define START_OPT       RESTART_OPT(1)
+#define USAGE(c)        (*srptoolOptions.pUsageProc)(&srptoolOptions, c)
+/* extracted from opthead.tlib near line 484 */
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+/*
+ *  global exported definitions
+ */
+#include <gettext.h>
+
+
+/* * * * * *
+ *
+ *  Declare the srptool option descriptor.
+ */
+extern tOptions srptoolOptions;
+
+#if defined(ENABLE_NLS)
+# ifndef _
+#   include <stdio.h>
+static inline char* aoGetsText(char const* pz) {
+    if (pz == NULL) return NULL;
+    return (char*)gettext(pz);
+}
+#   define _(s)  aoGetsText(s)
+# endif /* _() */
+
+# define OPT_NO_XLAT_CFG_NAMES  STMTS(srptoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT_CFG;)
+# define OPT_NO_XLAT_OPT_NAMES  STMTS(srptoolOptions.fOptSet |= \
+                                    OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG;)
+
+# define OPT_XLAT_CFG_NAMES     STMTS(srptoolOptions.fOptSet &= \
+                                  ~(OPTPROC_NXLAT_OPT|OPTPROC_NXLAT_OPT_CFG);)
+# define OPT_XLAT_OPT_NAMES     STMTS(srptoolOptions.fOptSet &= \
+                                  ~OPTPROC_NXLAT_OPT;)
+
+#else   /* ENABLE_NLS */
+# define OPT_NO_XLAT_CFG_NAMES
+# define OPT_NO_XLAT_OPT_NAMES
+
+# define OPT_XLAT_CFG_NAMES
+# define OPT_XLAT_OPT_NAMES
+
+# ifndef _
+#   define _(_s)  _s
+# endif
+#endif  /* ENABLE_NLS */
+
+#ifdef  __cplusplus
+}
+#endif
+#endif /* AUTOOPTS_SRPTOOL_ARGS_H_GUARD */
+/* srptool-args.h ends here */
diff --git a/tests/cert-tests/template-test.pem 
b/tests/cert-tests/template-test.pem
index 30ddd8a..0b0866f 100644
--- a/tests/cert-tests/template-test.pem
+++ b/tests/cert-tests/template-test.pem
@@ -1,5 +1,5 @@
 -----BEGIN CERTIFICATE-----
-MIIDoDCCAwmgAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBuDELMAkGA1UEBhMCR1Ix
+MIID4jCCA0ugAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBuDELMAkGA1UEBhMCR1Ix
 EjAQBgNVBAoTCUtva28gaW5jLjEXMBUGA1UECxMOc2xlZXBpbmcgZGVwdC4xDzAN
 BgNVBAgTBkF0dGlraTEVMBMGA1UEAxMMQ2luZHkgTGF1cGVyMRcwFQYKCZImiZPy
 LGQBARMHY2xhdXBlcjEMMAoGA1UEDBMDRHIuMQ8wDQYDVQRBEwZqYWNrYWwxHDAa
@@ -11,12 +11,13 @@ 
BgNVBAwTA0RyLjEPMA0GA1UEQRMGamFja2FsMRwwGgYJKoZIhvcNAQkBFg1ub25l
 QG5vbmUub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQClxs51Q4S/ZJ4C
 JxPxA1n3eS2S7XwvUKQD8S15uYaLBX46u0Sqr4TPE5geHEo49zMtep9y1GttJrAx
 N3AQ+0Lp2J0YZX4ZSfwFlgRogx53hr/t9eUSOxP+MxicGnodaa9HAmB6H7noz9vI
-NDBRlj2MllwAvGHeCA+xNiF/qQDjBQIDAQABo4GzMIGwMA8GA1UdEwEB/wQFMAMB
-Af8wKAYDVR0RBCEwH4ENbm9uZUBub25lLm9yZ4EOd2hlcmVAbm9uZS5vcmcwEwYD
-VR0lBAwwCgYIKwYBBQUHAwkwDwYDVR0PAQH/BAUDAwcEADAdBgNVHQ4EFgQUXUCt
-8M6UQJWLfpmUHZJUIspyNl8wLgYDVR0fBCcwJTAjoCGgH4YdaHR0cDovL3d3dy5n
-ZXRjcmwuY3JsL2dldGNybC8wDQYJKoZIhvcNAQELBQADgYEASd+38D+lbUJIcDCK
-s8QbRpsfw3aRrgIjxY0kSpPeeJ6t+zttbUkdl3xVqZkldJHWZihdY1h0Nqh3W3An
-I6yr+Uex8az0LUrimc3EwYh4QWNUq142Dy2IXlmE3WOipjOatXeMZFj4mruJbYqZ
-psMUofmkNLXu8fEFauBU5jQ2SEA=
+NDBRlj2MllwAvGHeCA+xNiF/qQDjBQIDAQABo4H1MIHyMA8GA1UdEwEB/wQFMAMB
+Af8wagYDVR0RBGMwYYIMd3d3Lm5vbmUub3JnghN3d3cubW9yZXRoYW5vbmUub3Jn
+ghd3d3cuZXZlbm1vcmV0aGFub25lLm9yZ4cEwKgBAYENbm9uZUBub25lLm9yZ4EO
+d2hlcmVAbm9uZS5vcmcwEwYDVR0lBAwwCgYIKwYBBQUHAwkwDwYDVR0PAQH/BAUD
+AwcEADAdBgNVHQ4EFgQUXUCt8M6UQJWLfpmUHZJUIspyNl8wLgYDVR0fBCcwJTAj
+oCGgH4YdaHR0cDovL3d3dy5nZXRjcmwuY3JsL2dldGNybC8wDQYJKoZIhvcNAQEL
+BQADgYEAkRe0HlWiwWEWV815XYU7IBWD+e7hVnpyTNaFrS2zn1vQfi0XQ1eX8DjH
+AEWFB5qKppkdXTP0MihieFvUbmgybuc/ep7JRu3l2MBly2latSJViqiHoo9GHqbi
+lX9KX8XUx1+ONbBy3rYqUATq+z7WEdN9iN8wNXMVMTv0hD5GnuM=
 -----END CERTIFICATE-----


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]