summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/t_req.c
diff options
context:
space:
mode:
authorbeck <>2000-03-19 11:13:58 +0000
committerbeck <>2000-03-19 11:13:58 +0000
commit796d609550df3a33fc11468741c5d2f6d3df4c11 (patch)
tree6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/asn1/t_req.c
parent5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff)
downloadopenbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2 if you are using the ssl26 packages for ssh and other things to work you will need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/asn1/t_req.c')
-rw-r--r--src/lib/libcrypto/asn1/t_req.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/lib/libcrypto/asn1/t_req.c b/src/lib/libcrypto/asn1/t_req.c
index bdd749436a..81dd6355a8 100644
--- a/src/lib/libcrypto/asn1/t_req.c
+++ b/src/lib/libcrypto/asn1/t_req.c
@@ -62,6 +62,7 @@
62#include <openssl/bn.h> 62#include <openssl/bn.h>
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 66
66#ifndef NO_FP_API 67#ifndef NO_FP_API
67int X509_REQ_print_fp(FILE *fp, X509_REQ *x) 68int X509_REQ_print_fp(FILE *fp, X509_REQ *x)
@@ -90,6 +91,7 @@ int X509_REQ_print(BIO *bp, X509_REQ *x)
90 X509_REQ_INFO *ri; 91 X509_REQ_INFO *ri;
91 EVP_PKEY *pkey; 92 EVP_PKEY *pkey;
92 STACK_OF(X509_ATTRIBUTE) *sk; 93 STACK_OF(X509_ATTRIBUTE) *sk;
94 STACK_OF(X509_EXTENSION) *exts;
93 char str[128]; 95 char str[128];
94 96
95 ri=x->req_info; 97 ri=x->req_info;
@@ -161,6 +163,8 @@ int X509_REQ_print(BIO *bp, X509_REQ *x)
161 int j,type=0,count=1,ii=0; 163 int j,type=0,count=1,ii=0;
162 164
163 a=sk_X509_ATTRIBUTE_value(sk,i); 165 a=sk_X509_ATTRIBUTE_value(sk,i);
166 if(X509_REQ_extension_nid(OBJ_obj2nid(a->object)))
167 continue;
164 sprintf(str,"%12s",""); 168 sprintf(str,"%12s","");
165 if (BIO_puts(bp,str) <= 0) goto err; 169 if (BIO_puts(bp,str) <= 0) goto err;
166 if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0) 170 if ((j=i2a_ASN1_OBJECT(bp,a->object)) > 0)
@@ -201,6 +205,29 @@ get_next:
201 } 205 }
202 } 206 }
203 207
208 exts = X509_REQ_get_extensions(x);
209 if(exts) {
210 BIO_printf(bp,"%8sRequested Extensions:\n","");
211 for (i=0; i<sk_X509_EXTENSION_num(exts); i++) {
212 ASN1_OBJECT *obj;
213 X509_EXTENSION *ex;
214 int j;
215 ex=sk_X509_EXTENSION_value(exts, i);
216 if (BIO_printf(bp,"%12s","") <= 0) goto err;
217 obj=X509_EXTENSION_get_object(ex);
218 i2a_ASN1_OBJECT(bp,obj);
219 j=X509_EXTENSION_get_critical(ex);
220 if (BIO_printf(bp,": %s\n",j?"critical":"","") <= 0)
221 goto err;
222 if(!X509V3_EXT_print(bp, ex, 0, 16)) {
223 BIO_printf(bp, "%16s", "");
224 M_ASN1_OCTET_STRING_print(bp,ex->value);
225 }
226 if (BIO_write(bp,"\n",1) <= 0) goto err;
227 }
228 sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
229 }
230
204 i=OBJ_obj2nid(x->sig_alg->algorithm); 231 i=OBJ_obj2nid(x->sig_alg->algorithm);
205 sprintf(str,"%4sSignature Algorithm: %s","", 232 sprintf(str,"%4sSignature Algorithm: %s","",
206 (i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)); 233 (i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i));