diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/t_req.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/t_req.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/t_req.c b/src/lib/libcrypto/asn1/t_req.c index 740cee80c0..5557e06584 100644 --- a/src/lib/libcrypto/asn1/t_req.c +++ b/src/lib/libcrypto/asn1/t_req.c | |||
| @@ -63,6 +63,12 @@ | |||
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 65 | #include <openssl/x509v3.h> | 65 | #include <openssl/x509v3.h> |
| 66 | #ifndef OPENSSL_NO_RSA | ||
| 67 | #include <openssl/rsa.h> | ||
| 68 | #endif | ||
| 69 | #ifndef OPENSSL_NO_DSA | ||
| 70 | #include <openssl/dsa.h> | ||
| 71 | #endif | ||
| 66 | 72 | ||
| 67 | #ifndef OPENSSL_NO_FP_API | 73 | #ifndef OPENSSL_NO_FP_API |
| 68 | int X509_REQ_print_fp(FILE *fp, X509_REQ *x) | 74 | int X509_REQ_print_fp(FILE *fp, X509_REQ *x) |
| @@ -160,6 +166,14 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, unsigned long | |||
| 160 | } | 166 | } |
| 161 | else | 167 | else |
| 162 | #endif | 168 | #endif |
| 169 | #ifndef OPENSSL_NO_EC | ||
| 170 | if (pkey->type == EVP_PKEY_EC) | ||
| 171 | { | ||
| 172 | BIO_printf(bp, "%12sEC Public Key: \n",""); | ||
| 173 | EC_KEY_print(bp, pkey->pkey.ec, 16); | ||
| 174 | } | ||
| 175 | else | ||
| 176 | #endif | ||
| 163 | BIO_printf(bp,"%12sUnknown Public Key:\n",""); | 177 | BIO_printf(bp,"%12sUnknown Public Key:\n",""); |
| 164 | 178 | ||
| 165 | EVP_PKEY_free(pkey); | 179 | EVP_PKEY_free(pkey); |
| @@ -230,7 +244,7 @@ get_next: | |||
| 230 | } | 244 | } |
| 231 | } | 245 | } |
| 232 | } | 246 | } |
| 233 | if(!(cflag & X509_FLAG_NO_ATTRIBUTES)) | 247 | if(!(cflag & X509_FLAG_NO_EXTENSIONS)) |
| 234 | { | 248 | { |
| 235 | exts = X509_REQ_get_extensions(x); | 249 | exts = X509_REQ_get_extensions(x); |
| 236 | if(exts) | 250 | if(exts) |
| @@ -246,9 +260,9 @@ get_next: | |||
| 246 | obj=X509_EXTENSION_get_object(ex); | 260 | obj=X509_EXTENSION_get_object(ex); |
| 247 | i2a_ASN1_OBJECT(bp,obj); | 261 | i2a_ASN1_OBJECT(bp,obj); |
| 248 | j=X509_EXTENSION_get_critical(ex); | 262 | j=X509_EXTENSION_get_critical(ex); |
| 249 | if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0) | 263 | if (BIO_printf(bp,": %s\n",j?"critical":"") <= 0) |
| 250 | goto err; | 264 | goto err; |
| 251 | if(!X509V3_EXT_print(bp, ex, 0, 16)) | 265 | if(!X509V3_EXT_print(bp, ex, cflag, 16)) |
| 252 | { | 266 | { |
| 253 | BIO_printf(bp, "%16s", ""); | 267 | BIO_printf(bp, "%16s", ""); |
| 254 | M_ASN1_OCTET_STRING_print(bp,ex->value); | 268 | M_ASN1_OCTET_STRING_print(bp,ex->value); |
| @@ -266,7 +280,7 @@ get_next: | |||
| 266 | 280 | ||
| 267 | return(1); | 281 | return(1); |
| 268 | err: | 282 | err: |
| 269 | X509err(X509_F_X509_REQ_PRINT,ERR_R_BUF_LIB); | 283 | X509err(X509_F_X509_REQ_PRINT_EX,ERR_R_BUF_LIB); |
| 270 | return(0); | 284 | return(0); |
| 271 | } | 285 | } |
| 272 | 286 | ||
