Group and sort includes.
authorjsing <jsing@openbsd.org>
Sun, 18 May 2014 16:21:03 +0000 (16:21 +0000)
committerjsing <jsing@openbsd.org>
Sun, 18 May 2014 16:21:03 +0000 (16:21 +0000)
Currently "apps.h" needs to be included before any of the openssl headers
and there are several cases where the code depends on headers that are
included by something included by apps.h...

More untangling saved for later on.

50 files changed:
lib/libssl/src/apps/apps.c
lib/libssl/src/apps/apps.h
lib/libssl/src/apps/asn1pars.c
lib/libssl/src/apps/ca.c
lib/libssl/src/apps/ciphers.c
lib/libssl/src/apps/cms.c
lib/libssl/src/apps/crl.c
lib/libssl/src/apps/crl2p7.c
lib/libssl/src/apps/dgst.c
lib/libssl/src/apps/dh.c
lib/libssl/src/apps/dhparam.c
lib/libssl/src/apps/dsa.c
lib/libssl/src/apps/dsaparam.c
lib/libssl/src/apps/ec.c
lib/libssl/src/apps/ecparam.c
lib/libssl/src/apps/enc.c
lib/libssl/src/apps/engine.c
lib/libssl/src/apps/errstr.c
lib/libssl/src/apps/gendh.c
lib/libssl/src/apps/gendsa.c
lib/libssl/src/apps/genpkey.c
lib/libssl/src/apps/genrsa.c
lib/libssl/src/apps/nseq.c
lib/libssl/src/apps/ocsp.c
lib/libssl/src/apps/openssl.c
lib/libssl/src/apps/passwd.c
lib/libssl/src/apps/pkcs12.c
lib/libssl/src/apps/pkcs7.c
lib/libssl/src/apps/pkcs8.c
lib/libssl/src/apps/pkey.c
lib/libssl/src/apps/pkeyparam.c
lib/libssl/src/apps/pkeyutl.c
lib/libssl/src/apps/prime.c
lib/libssl/src/apps/rand.c
lib/libssl/src/apps/req.c
lib/libssl/src/apps/rsa.c
lib/libssl/src/apps/rsautl.c
lib/libssl/src/apps/s_cb.c
lib/libssl/src/apps/s_client.c
lib/libssl/src/apps/s_server.c
lib/libssl/src/apps/s_socket.c
lib/libssl/src/apps/s_time.c
lib/libssl/src/apps/sess_id.c
lib/libssl/src/apps/smime.c
lib/libssl/src/apps/speed.c
lib/libssl/src/apps/spkac.c
lib/libssl/src/apps/ts.c
lib/libssl/src/apps/verify.c
lib/libssl/src/apps/version.c
lib/libssl/src/apps/x509.c

index a96de0c..7f01956 100644 (file)
 
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
-#include <ctype.h>
-#include <errno.h>
-#include <assert.h>
 #include <unistd.h>
 
+#include "apps.h"
+
+#include <openssl/bn.h>
 #include <openssl/err.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
 #include <openssl/pem.h>
 #include <openssl/pkcs12.h>
-#include <openssl/ui.h>
 #include <openssl/safestack.h>
+#include <openssl/ui.h>
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
+
 #ifndef OPENSSL_NO_RSA
 #include <openssl/rsa.h>
 #endif
-#include <openssl/bn.h>
-
-#include "apps.h"
-
 
 typedef struct {
        const char *name;
index cbbf0ea..31b2c8d 100644 (file)
 #ifndef HEADER_APPS_H
 #define HEADER_APPS_H
 
-#include <openssl/e_os2.h>
+#include <signal.h>
+
 #include <openssl/bio.h>
-#include <openssl/x509.h>
-#include <openssl/lhash.h>
 #include <openssl/conf.h>
+#include <openssl/e_os2.h>
+#include <openssl/lhash.h>
+#include <openssl/ossl_typ.h>
 #include <openssl/txt_db.h>
+#include <openssl/x509.h>
+
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
+
 #ifndef OPENSSL_NO_OCSP
 #include <openssl/ocsp.h>
 #endif
-#include <openssl/ossl_typ.h>
 
 extern CONF *config;
 extern char *default_config_file;
 extern BIO *bio_err;
 
-#include <signal.h>
-
 typedef struct args_st {
        char **data;
        int count;
index a8af0aa..2d56487 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (DER or PEM)
  * -in arg     - input file - default stdin
@@ -77,7 +79,6 @@
  * -oid file   - extra oid description file
  */
 
-
 int asn1parse_main(int, char **);
 
 static int do_generate(BIO * bio, char *genstr, char *genconf, BUF_MEM * buf);
index c771598..23c1318 100644 (file)
 
 /* The PPKI stuff has been donated by Jeff Barber <jeffb@issl.atl.hp.com> */
 
+#include <sys/types.h>
+
+#ifndef W_OK
+#include <sys/file.h>
+#endif
+
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
 #include <unistd.h>
-#include <sys/types.h>
-#include <openssl/conf.h>
+
+#include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
-#include <openssl/txt_db.h>
+#include <openssl/conf.h>
+#include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
 #include <openssl/objects.h>
 #include <openssl/ocsp.h>
 #include <openssl/pem.h>
-
-#ifndef W_OK
-#include <sys/file.h>
-#endif
-
-#include "apps.h"
+#include <openssl/txt_db.h>
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
 
 #ifndef W_OK
 #define F_OK 0
@@ -89,7 +91,6 @@
 #define R_OK 4
 #endif
 
-
 #define BASE_SECTION   "ca"
 
 #define ENV_DEFAULT_CA         "default_ca"
index 70d9a89..0e3b827 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 
-
 static const char *ciphers_usage[] = {
        "usage: ciphers args\n",
        " -v          - verbose mode, a textual listing of the SSL/TLS ciphers in OpenSSL\n",
index fa1bd9a..01b4a2a 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
 
 #ifndef OPENSSL_NO_CMS
 
+#include <openssl/cms.h>
 #include <openssl/crypto.h>
-#include <openssl/pem.h>
 #include <openssl/err.h>
+#include <openssl/pem.h>
 #include <openssl/x509_vfy.h>
 #include <openssl/x509v3.h>
-#include <openssl/cms.h>
 
 static int save_certs(char *signerfile, STACK_OF(X509) * signers);
 static int cms_cb(int ok, X509_STORE_CTX * ctx);
index 50ac0e1..0d17ba9 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
+#include <openssl/pem.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
-#include <openssl/pem.h>
-
 
 #define        POSTFIX ".rvk"
 
index f972a39..9d3552a 100644 (file)
  * and donated 'to the cause' along with lots and lots of other fixes to
  * the library. */
 
+#include <sys/types.h>
+
 #include <stdio.h>
 #include <string.h>
-#include <sys/types.h>
+
 #include "apps.h"
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/pkcs7.h>
-#include <openssl/pem.h>
 #include <openssl/objects.h>
+#include <openssl/pem.h>
+#include <openssl/pkcs7.h>
+#include <openssl/x509.h>
 
 static int add_certs_from_file(STACK_OF(X509) * stack, char *certfile);
 
index f2c228c..c183229 100644 (file)
  */
 
 #include <stdio.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
+#include <openssl/hmac.h>
 #include <openssl/objects.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-#include <openssl/hmac.h>
+#include <openssl/x509.h>
 
 #define BUFSIZE        1024*8
 
-
 int
 do_fp(BIO * out, unsigned char *buf, BIO * bp, int sep, int binout,
     EVP_PKEY * key, unsigned char *sigin, int siglen,
index 7e5e142..e7e6e1d 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#include <openssl/opensslconf.h>/* for OPENSSL_NO_DH */
+#include <openssl/opensslconf.h>       /* for OPENSSL_NO_DH */
+
 #ifndef OPENSSL_NO_DH
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
 #include <string.h>
+#include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
+#include <openssl/err.h>
 #include <openssl/dh.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (DER or PEM)
  * -outform arg - output format - default PEM
index 0cb99c5..3973ad0 100644 (file)
  *
  */
 
-#include <openssl/opensslconf.h>/* for OPENSSL_NO_DH */
+#include <openssl/opensslconf.h>       /* for OPENSSL_NO_DH */
+
 #ifndef OPENSSL_NO_DH
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
 #include <string.h>
+#include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
+#include <openssl/err.h>
 #include <openssl/dh.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
+#include <openssl/x509.h>
 
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
 
-
 #define DEFBITS        512
 
 /* -inform arg - input format - default PEM (DER or PEM)
index 8104019..4026ba5 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */
+#include <openssl/opensslconf.h>       /* for OPENSSL_NO_DSA */
+
 #ifndef OPENSSL_NO_DSA
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <time.h>
+#include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
+#include <openssl/bn.h>
 #include <openssl/dsa.h>
+#include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-#include <openssl/bn.h>
-
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (one of DER, NET or PEM)
  * -outform arg - output format - default PEM
index 6488c4b..75ffa60 100644 (file)
@@ -56,7 +56,8 @@
  * [including the GNU Public Licence.]
  */
 
-#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */
+#include <openssl/opensslconf.h>       /* for OPENSSL_NO_DSA */
+
 /* Until the key-gen callbacks are modified to use newer prototypes, we allow
  * deprecated functions for openssl-internal code */
 #ifdef OPENSSL_NO_DEPRECATED
 #endif
 
 #ifndef OPENSSL_NO_DSA
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
 #include <string.h>
+#include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
+#include <openssl/err.h>
 #include <openssl/dsa.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (DER or PEM)
  * -outform arg - output format - default PEM
index 3f4a1d0..6bd71c3 100644 (file)
  */
 
 #include <openssl/opensslconf.h>
+
 #ifndef OPENSSL_NO_EC
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/pem.h>
 
-
 /* -inform arg    - input format - default PEM (one of DER, NET or PEM)
  * -outform arg   - output format - default PEM
  * -in arg        - input file - default stdin
index 84ecba7..9d517ea 100644 (file)
  */
 
 #include <openssl/opensslconf.h>
+
 #ifndef OPENSSL_NO_EC
+
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
 #include <string.h>
+#include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
 #include <openssl/ec.h>
-#include <openssl/x509.h>
+#include <openssl/err.h>
 #include <openssl/pem.h>
-
+#include <openssl/x509.h>
 
 /* -inform arg      - input format - default PEM (DER or PEM)
  * -outform arg     - output format - default PEM
index 0ac6a43..b31d103 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
+#include <openssl/comp.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/objects.h>
-#include <openssl/x509.h>
-#include <openssl/rand.h>
 #include <openssl/pem.h>
-#include <openssl/comp.h>
-#include <ctype.h>
+#include <openssl/rand.h>
+#include <openssl/x509.h>
 
 int set_hex(char *in, unsigned char *out, int size);
 
index 7b11ea5..2cf7bd2 100644 (file)
  *
  */
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/err.h>
+
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
+#include <openssl/err.h>
 #include <openssl/ssl.h>
 
-
 static const char *engine_usage[] = {
        "usage: engine opts [engine ...]\n",
        " -v[v[v[v]]] - verbose mode, for each engine, list its 'control commands'\n",
index 4605f09..5c72428 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/lhash.h>
 #include <openssl/err.h>
+#include <openssl/lhash.h>
 #include <openssl/ssl.h>
 
-
 int errstr_main(int, char **);
 
 int
index 4dd5c02..4fd4709 100644 (file)
@@ -58,6 +58,7 @@
  */
 
 #include <openssl/opensslconf.h>
+
 /* Until the key-gen callbacks are modified to use newer prototypes, we allow
  * deprecated functions for openssl-internal code */
 #ifdef OPENSSL_NO_DEPRECATED
 #endif
 
 #ifndef OPENSSL_NO_DH
-#include <stdio.h>
-#include <string.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/rand.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
 #include <openssl/dh.h>
-#include <openssl/x509.h>
+#include <openssl/err.h>
 #include <openssl/pem.h>
+#include <openssl/rand.h>
+#include <openssl/x509.h>
 
 #define DEFBITS        512
 
index df0993e..cada26b 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#include <openssl/opensslconf.h>/* for OPENSSL_NO_DSA */
+#include <openssl/opensslconf.h>       /* for OPENSSL_NO_DSA */
+
 #ifndef OPENSSL_NO_DSA
-#include <stdio.h>
-#include <string.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
 #include <openssl/dsa.h>
-#include <openssl/x509.h>
+#include <openssl/err.h>
 #include <openssl/pem.h>
+#include <openssl/x509.h>
 
 #define DEFBITS        512
 
index 1b3bc57..5797de4 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/pem.h>
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
+#include <openssl/pem.h>
+
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
index 7e5dd2b..96a678c 100644 (file)
@@ -57,6 +57,7 @@
  */
 
 #include <openssl/opensslconf.h>
+
 /* Until the key-gen callbacks are modified to use newer prototypes, we allow
  * deprecated functions for openssl-internal code */
 #ifdef OPENSSL_NO_DEPRECATED
 #endif
 
 #ifndef OPENSSL_NO_RSA
-#include <stdio.h>
-#include <string.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#include <stdio.h>
+#include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
-#include <openssl/err.h>
 #include <openssl/bn.h>
-#include <openssl/rsa.h>
+#include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
 #include <openssl/rand.h>
+#include <openssl/rsa.h>
+#include <openssl/x509.h>
 
 #define DEFBITS        2048
 
index 0a1512a..d5271b1 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/pem.h>
-#include <openssl/err.h>
 
+#include <openssl/err.h>
+#include <openssl/pem.h>
 
 int nseq_main(int, char **);
 
index 9577821..5e9e101 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
-#include "apps.h"              /* needs to be included before the openssl
-                                * headers! */
-#include <openssl/e_os2.h>
+
+/* Needs to be included before the openssl headers! */
+#include "apps.h"
+
+#include <openssl/bn.h>
 #include <openssl/crypto.h>
+#include <openssl/e_os2.h>
 #include <openssl/err.h>
-#include <openssl/ssl.h>
 #include <openssl/evp.h>
-#include <openssl/bn.h>
+#include <openssl/ssl.h>
 #include <openssl/x509v3.h>
 
 /* Maximum leeway in validity period: default 5 minutes */
index 2250701..4742803 100644 (file)
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
+#include <openssl/conf.h>
 #include <openssl/crypto.h>
-#include <openssl/rand.h>
+#include <openssl/err.h>
 #include <openssl/lhash.h>
-#include <openssl/conf.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
+#include <openssl/rand.h>
 #include <openssl/ssl.h>
+#include <openssl/x509.h>
+
 #ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
 #endif
+
 #include "progs.h"
 #include "s_apps.h"
-#include <openssl/err.h>
 
 static void openssl_startup(void);
 static void openssl_shutdown(void);
index 30a38aa..e87aed3 100644 (file)
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/rand.h>
+
 #ifndef OPENSSL_NO_DES
 #include <openssl/des.h>
 #endif
+
 #ifndef NO_MD5CRYPT_1
 #include <openssl/md5.h>
 #endif
 
-
-
-
 static unsigned const char cov_2char[64] = {
        /* from crypto/des/fcrypt.c */
        0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35,
index f23d902..aca248a 100644 (file)
  */
 
 #include <openssl/opensslconf.h>
+
 #if !defined(OPENSSL_NO_DES) && !defined(OPENSSL_NO_SHA1)
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/pkcs12.h>
 
-
 const EVP_CIPHER *enc;
 
-
 #define NOKEYS         0x1
 #define NOCERTS        0x2
 #define INFO           0x4
index 8540a3f..57e611f 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+
 #include "apps.h"
+
 #include <openssl/err.h>
-#include <openssl/objects.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/pkcs7.h>
+#include <openssl/objects.h>
 #include <openssl/pem.h>
-
+#include <openssl/pkcs7.h>
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (DER or PEM)
  * -outform arg - output format - default PEM
index ee6a48f..1f1a11e 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/pem.h>
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
+#include <openssl/pem.h>
 #include <openssl/pkcs12.h>
 
-
 int pkcs8_main(int, char **);
 
 int 
index 627278f..101ba5b 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/pem.h>
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
-
+#include <openssl/pem.h>
 
 int pkey_main(int, char **);
 
index caeaf19..d12ac0b 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/pem.h>
+
 #include <openssl/err.h>
 #include <openssl/evp.h>
-
+#include <openssl/pem.h>
 
 int pkeyparam_main(int, char **);
 
index c112c77..46392e6 100644 (file)
  *
  */
 
+#include <string.h>
 
 #include "apps.h"
-#include <string.h>
+
 #include <openssl/err.h>
-#include <openssl/pem.h>
 #include <openssl/evp.h>
+#include <openssl/pem.h>
 
 #define KEY_PRIVKEY    1
 #define KEY_PUBKEY     2
@@ -68,8 +69,6 @@
 
 static void usage(void);
 
-
-
 static EVP_PKEY_CTX *init_ctx(int *pkeysize,
     char *keyfile, int keyform, int key_type,
     char *passargin, int pkey_op, ENGINE * e);
index c6f562a..de8f232 100644 (file)
@@ -50,9 +50,8 @@
 #include <string.h>
 
 #include "apps.h"
-#include <openssl/bn.h>
-
 
+#include <openssl/bn.h>
 
 int prime_main(int, char **);
 
index 355a42e..c543e32 100644 (file)
  *
  */
 
-#include "apps.h"
-
 #include <ctype.h>
 #include <stdio.h>
 #include <string.h>
 
+#include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/rand.h>
 
-
 /* -out file         - write to file
  * -rand file:file   - PRNG seed files
  * -base64           - base64 encode output
index 26a3e11..21ddb3b 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <time.h>
 #include <string.h>
+#include <time.h>
+
 #include "apps.h"
+
+#include <openssl/asn1.h>
 #include <openssl/bio.h>
-#include <openssl/evp.h>
+#include <openssl/bn.h>
 #include <openssl/conf.h>
 #include <openssl/err.h>
-#include <openssl/asn1.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
+#include <openssl/evp.h>
 #include <openssl/objects.h>
 #include <openssl/pem.h>
-#include <openssl/bn.h>
-#ifndef OPENSSL_NO_RSA
-#include <openssl/rsa.h>
-#endif
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
 
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+
 #define SECTION                "req"
 
 #define BITS           "default_bits"
index 3e0b2eb..0b9c87d 100644 (file)
  */
 
 #include <openssl/opensslconf.h>
+
 #ifndef OPENSSL_NO_RSA
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
+#include <openssl/bn.h>
 #include <openssl/err.h>
-#include <openssl/rsa.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-#include <openssl/bn.h>
-
+#include <openssl/rsa.h>
+#include <openssl/x509.h>
 
 /* -inform arg - input format - default PEM (one of DER, NET or PEM)
  * -outform arg - output format - default PEM
index 04992ae..55c89b2 100644 (file)
  */
 
 #include <openssl/opensslconf.h>
+
 #ifndef OPENSSL_NO_RSA
 
-#include "apps.h"
 #include <string.h>
+
+#include "apps.h"
+
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/rsa.h>
@@ -76,8 +79,6 @@
 
 static void usage(void);
 
-
-
 int rsautl_main(int argc, char **);
 
 int 
index 9da5825..977dd75 100644 (file)
  *
  */
 
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
+#include <netdb.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
 
 #include "apps.h"
+
 #include <openssl/err.h>
 #include <openssl/rand.h>
-#include <openssl/x509.h>
 #include <openssl/ssl.h>
+#include <openssl/x509.h>
+
 #include "s_apps.h"
 
 #define        COOKIE_SECRET_LENGTH    16
index 7549c98..d29f147 100644 (file)
 
 #include <sys/types.h>
 #include <sys/ioctl.h>
+#include <sys/socket.h>
 
 #include <netinet/in.h>
+
 #include <assert.h>
 #include <ctype.h>
+#include <limits.h>
+#include <netdb.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <limits.h>
 #include <string.h>
 #include <unistd.h>
-#include <openssl/e_os2.h>
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
 
 #include "apps.h"
-#include <openssl/x509.h>
-#include <openssl/ssl.h>
+
+#include <openssl/bn.h>
+#include <openssl/e_os2.h>
 #include <openssl/err.h>
+#include <openssl/ocsp.h>
 #include <openssl/pem.h>
 #include <openssl/rand.h>
-#include <openssl/ocsp.h>
-#include <openssl/bn.h>
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+
 #include "s_apps.h"
 #include "timeouts.h"
 
-
-
 /*#define SSL_HOST_NAME        "www.netscape.com" */
 /*#define SSL_HOST_NAME        "193.118.187.102" */
 #define SSL_HOST_NAME  "localhost"
index 67886bb..333e09f 100644 (file)
 #undef OPENSSL_NO_DEPRECATED
 #endif
 
+#include <sys/types.h>
 #include <sys/ioctl.h>
+#include <sys/socket.h>
 
 #include <assert.h>
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <sys/socket.h>
 
-#include <openssl/e_os2.h>
-
-#include <sys/types.h>
+#include "apps.h"
 
-#include <openssl/lhash.h>
 #include <openssl/bn.h>
-#include "apps.h"
+#include <openssl/e_os2.h>
 #include <openssl/err.h>
+#include <openssl/lhash.h>
+#include <openssl/ocsp.h>
 #include <openssl/pem.h>
-#include <openssl/x509.h>
-#include <openssl/ssl.h>
 #include <openssl/rand.h>
-#include <openssl/ocsp.h>
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
+
 #ifndef OPENSSL_NO_DH
 #include <openssl/dh.h>
 #endif
+
 #ifndef OPENSSL_NO_RSA
 #include <openssl/rsa.h>
 #endif
+
 #include "s_apps.h"
 #include "timeouts.h"
 
-
 #ifndef OPENSSL_NO_RSA
 static RSA *tmp_rsa_cb(SSL * s, int is_export, int keylength);
 #endif
index 919ab40..a9bbe97 100644 (file)
  * [including the GNU Public Licence.]
  */
 
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+
+#include <errno.h>
+#include <netdb.h>
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <signal.h>
-#include <netdb.h>
 #include <unistd.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <openssl/e_os2.h>
 
 #include "apps.h"
-#include "s_apps.h"
-#include <openssl/ssl.h>
 
+#include <openssl/e_os2.h>
+#include <openssl/ssl.h>
 
+#include "s_apps.h"
 
 static int ssl_sock_init(void);
 static int init_server(int *sock, int port, int type);
@@ -81,7 +82,6 @@ static int do_accept(int acc_sock, int *sock, char **host);
 
 #define SOCKET_PROTOCOL        IPPROTO_TCP
 
-
 static int
 ssl_sock_init(void)
 {
index 4cf62ff..e242037 100644 (file)
    Written and donated by Larry Streepy <streepy@healthcare.com>
   -----------------------------------------*/
 
+#include <sys/socket.h>
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/socket.h>
+#include <unistd.h>
 
 #include "apps.h"
-#include <openssl/x509.h>
-#include <openssl/ssl.h>
-#include <openssl/pem.h>
-#include "s_apps.h"
+
 #include <openssl/err.h>
-#include <unistd.h>
+#include <openssl/pem.h>
+#include <openssl/ssl.h>
+#include <openssl/x509.h>
 
+#include "s_apps.h"
 
 #define SSL_CONNECT_NAME       "localhost:4433"
 
index 49766fd..f255f25 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
 #include <openssl/ssl.h>
-
+#include <openssl/x509.h>
 
 static const char *sess_id_usage[] = {
        "usage: sess_id args\n",
index f7d56b3..78d783d 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/crypto.h>
-#include <openssl/pem.h>
 #include <openssl/err.h>
+#include <openssl/pem.h>
 #include <openssl/x509_vfy.h>
 #include <openssl/x509v3.h>
 
index f96e901..6bcb943 100644 (file)
 #include <string.h>
 #include <unistd.h>
 
+#include "apps.h"
+
 #include <openssl/bn.h>
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/objects.h>
 #include <openssl/modes.h>
+#include <openssl/objects.h>
 #include <openssl/rand.h>
 #include <openssl/x509.h>
 
 #include <openssl/whrlpool.h>
 #endif
 
-#include "apps.h"
-
 #ifndef OPENSSL_NO_DSA
 #include "./testdsa.h"
 #endif
index 8fa21d9..2fa7eac 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/conf.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/lhash.h>
-#include <openssl/x509.h>
 #include <openssl/pem.h>
-
+#include <openssl/x509.h>
 
 /* -in arg     - input file - default stdin
  * -out arg    - output file - default stdout
index c2d333c..2bb343d 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
+#include <openssl/bn.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/rand.h>
 #include <openssl/ts.h>
-#include <openssl/bn.h>
-
 
 /* Length of the nonce of the request in bits (must be a multiple of 8). */
 #define        NONCE_LENGTH            64
index b73956b..b691460 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
+
 #include <openssl/bio.h>
 #include <openssl/err.h>
+#include <openssl/pem.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
-#include <openssl/pem.h>
-
 
 static int cb(int ok, X509_STORE_CTX * ctx);
 static int check(X509_STORE * ctx, char *file, STACK_OF(X509) * uchain,
index e7c58b5..cac5b6f 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/evp.h>
-#include <openssl/crypto.h>
+
 #include <openssl/bn.h>
-#ifndef OPENSSL_NO_RC4
-#include <openssl/rc4.h>
+#include <openssl/crypto.h>
+#include <openssl/evp.h>
+
+#ifndef OPENSSL_NO_BF
+#include <openssl/blowfish.h>
 #endif
+
 #ifndef OPENSSL_NO_DES
 #include <openssl/des.h>
 #endif
+
 #ifndef OPENSSL_NO_IDEA
 #include <openssl/idea.h>
 #endif
-#ifndef OPENSSL_NO_BF
-#include <openssl/blowfish.h>
-#endif
 
+#ifndef OPENSSL_NO_RC4
+#include <openssl/rc4.h>
+#endif
 
 int version_main(int, char **);
 
index 389b752..a488623 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "apps.h"
-#include <openssl/bio.h>
+
 #include <openssl/asn1.h>
-#include <openssl/err.h>
+#include <openssl/bio.h>
 #include <openssl/bn.h>
+#include <openssl/err.h>
 #include <openssl/evp.h>
-#include <openssl/x509.h>
-#include <openssl/x509v3.h>
 #include <openssl/objects.h>
 #include <openssl/pem.h>
-#ifndef OPENSSL_NO_RSA
-#include <openssl/rsa.h>
-#endif
+#include <openssl/x509.h>
+#include <openssl/x509v3.h>
+
 #ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
 #endif
 
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
 
 #define        POSTFIX ".srl"
 #define DEF_DAYS       30