Move cryptlib.h prior bio.h. Actually it makes sense to include cryptlib.h
authorAndy Polyakov <appro@openssl.org>
Tue, 17 May 2005 00:01:48 +0000 (00:01 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 17 May 2005 00:01:48 +0000 (00:01 +0000)
first everywhere in crypto and skip stdio.h and string.h [because it
includes them].

crypto/asn1/a_strex.c
crypto/conf/conf_def.c
crypto/err/err.c
crypto/err/err_prn.c
crypto/hmac/hmac.c
crypto/mem_dbg.c
crypto/ui/ui_lib.c

index bde666a6ff1553328edb70ec66b04aa67790a518..cc6a25d4d952c2bfd16df24357b9b93e0f79471e 100644 (file)
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
+#include "cryptlib.h"
 #include <openssl/crypto.h>
 #include <openssl/x509.h>
 #include <openssl/asn1.h>
 
 #include "charmap.h"
 #include <openssl/crypto.h>
 #include <openssl/x509.h>
 #include <openssl/asn1.h>
 
 #include "charmap.h"
-#include "cryptlib.h"
 
 /* ASN1_STRING_print_ex() and X509_NAME_print_ex().
  * Enhanced string and name printing routines handling
 
 /* ASN1_STRING_print_ex() and X509_NAME_print_ex().
  * Enhanced string and name printing routines handling
@@ -513,7 +513,7 @@ int X509_NAME_print_ex(BIO *out, X509_NAME *nm, int indent, unsigned long flags)
        return do_name_ex(send_bio_chars, out, nm, indent, flags);
 }
 
        return do_name_ex(send_bio_chars, out, nm, indent, flags);
 }
 
-
+#ifndef OPENSSL_NO_FP_API
 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
 {
        if(flags == XN_FLAG_COMPAT)
 int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long flags)
 {
        if(flags == XN_FLAG_COMPAT)
@@ -528,17 +528,19 @@ int X509_NAME_print_ex_fp(FILE *fp, X509_NAME *nm, int indent, unsigned long fla
                }
        return do_name_ex(send_fp_chars, fp, nm, indent, flags);
 }
                }
        return do_name_ex(send_fp_chars, fp, nm, indent, flags);
 }
+#endif
 
 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags)
 {
        return do_print_ex(send_bio_chars, out, flags, str);
 }
 
 
 int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags)
 {
        return do_print_ex(send_bio_chars, out, flags, str);
 }
 
-
+#ifndef OPENSSL_NO_FP_API
 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags)
 {
        return do_print_ex(send_fp_chars, fp, flags, str);
 }
 int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags)
 {
        return do_print_ex(send_fp_chars, fp, flags, str);
 }
+#endif
 
 /* Utility function: convert any string type to UTF8, returns number of bytes
  * in output string or a negative error code
 
 /* Utility function: convert any string type to UTF8, returns number of bytes
  * in output string or a negative error code
index f14de2293ecff0f440039ce530dc0ff6a51e55a1..996a0999ac04a3562a87c35a0db7c76c019cf609 100644 (file)
@@ -60,6 +60,7 @@
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>
+#include "cryptlib.h"
 #include <openssl/stack.h>
 #include <openssl/lhash.h>
 #include <openssl/conf.h>
 #include <openssl/stack.h>
 #include <openssl/lhash.h>
 #include <openssl/conf.h>
@@ -67,7 +68,6 @@
 #include "conf_def.h"
 #include <openssl/buffer.h>
 #include <openssl/err.h>
 #include "conf_def.h"
 #include <openssl/buffer.h>
 #include <openssl/err.h>
-#include "cryptlib.h"
 
 static char *eat_ws(CONF *conf, char *p);
 static char *eat_alpha_numeric(CONF *conf, char *p);
 
 static char *eat_ws(CONF *conf, char *p);
 static char *eat_alpha_numeric(CONF *conf, char *p);
index 549229bcfb39f8709af911524937d1daf556553e..e0847143831aed186a86b3745f67b0aab89182dd 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
+#include "cryptlib.h"
 #include <openssl/lhash.h>
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
 #include <openssl/crypto.h>
-#include "cryptlib.h"
 #include <openssl/buffer.h>
 #include <openssl/bio.h>
 #include <openssl/err.h>
 #include <openssl/buffer.h>
 #include <openssl/bio.h>
 #include <openssl/err.h>
index 81e34bd6ce7acfeccbe690aa6ab9953c390ed350..2224a901e5ea30a30e4332f2290c980faf20cc1b 100644 (file)
@@ -57,9 +57,9 @@
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
+#include "cryptlib.h"
 #include <openssl/lhash.h>
 #include <openssl/crypto.h>
 #include <openssl/lhash.h>
 #include <openssl/crypto.h>
-#include "cryptlib.h"
 #include <openssl/buffer.h>
 #include <openssl/err.h>
 
 #include <openssl/buffer.h>
 #include <openssl/err.h>
 
@@ -86,7 +86,12 @@ void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
 #ifndef OPENSSL_NO_FP_API
 static int print_fp(const char *str, size_t len, void *fp)
        {
 #ifndef OPENSSL_NO_FP_API
 static int print_fp(const char *str, size_t len, void *fp)
        {
-       return fprintf((FILE *)fp, "%s", str);
+       BIO bio;
+
+       BIO_set(&bio,BIO_s_file());
+       BIO_set_fp(&bio,fp,BIO_NOCLOSE);
+
+       return BIO_printf(&bio, "%s", str);
        }
 void ERR_print_errors_fp(FILE *fp)
        {
        }
 void ERR_print_errors_fp(FILE *fp)
        {
index 16d95e08d52f44cf008f1911291b5308f07ec1f9..c45e001492759d05c4a497206dd004ffeda76b3d 100644 (file)
@@ -58,8 +58,8 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <openssl/hmac.h>
 #include "cryptlib.h"
 #include "cryptlib.h"
+#include <openssl/hmac.h>
 
 void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
                  const EVP_MD *md, ENGINE *impl)
 
 void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
                  const EVP_MD *md, ENGINE *impl)
index e212de27e488df64c0a7879a40b3792b61f418e6..557516bde95fa4ad87e5c91b15ba4b51da644c55 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>      
 #include <stdio.h>
 #include <stdlib.h>
 #include <time.h>      
+#include "cryptlib.h"
 #include <openssl/crypto.h>
 #include <openssl/buffer.h>
 #include <openssl/bio.h>
 #include <openssl/lhash.h>
 #include <openssl/crypto.h>
 #include <openssl/buffer.h>
 #include <openssl/bio.h>
 #include <openssl/lhash.h>
-#include "cryptlib.h"
 
 static int mh_mode=CRYPTO_MEM_CHECK_OFF;
 /* The state changes to CRYPTO_MEM_CHECK_ON | CRYPTO_MEM_CHECK_ENABLE
 
 static int mh_mode=CRYPTO_MEM_CHECK_OFF;
 /* The state changes to CRYPTO_MEM_CHECK_ON | CRYPTO_MEM_CHECK_ENABLE
index 2d0d98926d4e6564ca3b121a4c19e40ba20dc730..1a8f3ce113ea6de25248cde5339709309a47cec8 100644 (file)
  */
 
 #include <string.h>
  */
 
 #include <string.h>
+#include "cryptlib.h"
 #include <openssl/e_os2.h>
 #include <openssl/buffer.h>
 #include <openssl/ui.h>
 #include <openssl/err.h>
 #include "ui_locl.h"
 #include <openssl/e_os2.h>
 #include <openssl/buffer.h>
 #include <openssl/ui.h>
 #include <openssl/err.h>
 #include "ui_locl.h"
-#include "cryptlib.h"
 
 IMPLEMENT_STACK_OF(UI_STRING_ST)
 
 
 IMPLEMENT_STACK_OF(UI_STRING_ST)