projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an evil cast, because POSIX/SUSv2 define connect(2) require
[oweals/openssl.git]
/
crypto
/
asn1
/
t_x509.c
diff --git
a/crypto/asn1/t_x509.c
b/crypto/asn1/t_x509.c
index e804635be2b07309545a0056493bea00ccdc0a54..6ee1065ce9468c081f087d24dc3d2ecdf65c6e4f 100644
(file)
--- a/
crypto/asn1/t_x509.c
+++ b/
crypto/asn1/t_x509.c
@@
-58,17
+58,17
@@
#include <stdio.h>
#include "cryptlib.h"
#include <stdio.h>
#include "cryptlib.h"
-#include
"buffer.h"
-#include
"bn.h"
+#include
<openssl/buffer.h>
+#include
<openssl/bn.h>
#ifndef NO_RSA
#ifndef NO_RSA
-#include
"rsa.h"
+#include
<openssl/rsa.h>
#endif
#ifndef NO_DSA
#endif
#ifndef NO_DSA
-#include
"dsa.h"
+#include
<openssl/dsa.h>
#endif
#endif
-#include
"objects.h"
-#include
"x509.h"
-#include
"x509v3.h"
+#include
<openssl/objects.h>
+#include
<openssl/x509.h>
+#include
<openssl/x509v3.h>
#ifndef NO_FP_API
int X509_print_fp(FILE *fp, X509 *x)
#ifndef NO_FP_API
int X509_print_fp(FILE *fp, X509 *x)
@@
-158,6
+158,7
@@
int X509_print(BIO *bp, X509 *x)
if (pkey == NULL)
{
BIO_printf(bp,"%12sUnable to load Public Key\n","");
if (pkey == NULL)
{
BIO_printf(bp,"%12sUnable to load Public Key\n","");
+ ERR_print_errors(bp);
}
else
#ifndef NO_RSA
}
else
#ifndef NO_RSA
@@
-187,11
+188,7
@@
int X509_print(BIO *bp, X509 *x)
BIO_printf(bp,"%8sX509v3 extensions:\n","");
for (i=0; i<n; i++)
{
BIO_printf(bp,"%8sX509v3 extensions:\n","");
for (i=0; i<n; i++)
{
-#if 0
- int data_type,pack_type;
-#endif
ASN1_OBJECT *obj;
ASN1_OBJECT *obj;
-
ex=X509_get_ext(x,i);
if (BIO_printf(bp,"%12s","") <= 0) goto err;
obj=X509_EXTENSION_get_object(ex);
ex=X509_get_ext(x,i);
if (BIO_printf(bp,"%12s","") <= 0) goto err;
obj=X509_EXTENSION_get_object(ex);
@@
-202,7
+199,7
@@
int X509_print(BIO *bp, X509 *x)
if(!X509V3_EXT_print(bp, ex, 0, 16))
{
BIO_printf(bp, "%16s", "");
if(!X509V3_EXT_print(bp, ex, 0, 16))
{
BIO_printf(bp, "%16s", "");
- ASN1_OCTET_STRING_print(bp,ex->value);
+
M_
ASN1_OCTET_STRING_print(bp,ex->value);
}
if (BIO_write(bp,"\n",1) <= 0) goto err;
}
}
if (BIO_write(bp,"\n",1) <= 0) goto err;
}
@@
-222,10
+219,11
@@
int X509_print(BIO *bp, X509 *x)
((i+1) == n)?"":":") <= 0) goto err;
}
if (BIO_write(bp,"\n",1) != 1) goto err;
((i+1) == n)?"":":") <= 0) goto err;
}
if (BIO_write(bp,"\n",1) != 1) goto err;
+ if (!X509_CERT_AUX_print(bp, x->aux, 0)) goto err;
ret=1;
err:
if (str != NULL) ASN1_STRING_free(str);
ret=1;
err:
if (str != NULL) ASN1_STRING_free(str);
- if (m != NULL) Free(
(char *)
m);
+ if (m != NULL) Free(m);
return(ret);
}
return(ret);
}
@@
-357,6
+355,7
@@
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
c=s;
for (;;)
{
c=s;
for (;;)
{
+#ifndef CHARSET_EBCDIC
if ( ((*s == '/') &&
((s[1] >= 'A') && (s[1] <= 'Z') && (
(s[2] == '=') ||
if ( ((*s == '/') &&
((s[1] >= 'A') && (s[1] <= 'Z') && (
(s[2] == '=') ||
@@
-364,6
+363,15
@@
int X509_NAME_print(BIO *bp, X509_NAME *name, int obase)
(s[3] == '='))
))) ||
(*s == '\0'))
(s[3] == '='))
))) ||
(*s == '\0'))
+#else
+ if ( ((*s == '/') &&
+ (isupper(s[1]) && (
+ (s[2] == '=') ||
+ (isupper(s[2]) &&
+ (s[3] == '='))
+ ))) ||
+ (*s == '\0'))
+#endif
{
if ((l <= 0) && !first)
{
{
if ((l <= 0) && !first)
{