diff options
Diffstat (limited to 'crypto/ocsp/ocsp_lib.c')
-rw-r--r-- | crypto/ocsp/ocsp_lib.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c index f633ca749b..6f810d584d 100644 --- a/crypto/ocsp/ocsp_lib.c +++ b/crypto/ocsp/ocsp_lib.c @@ -460,85 +460,6 @@ GENERAL_NAME *n; return 1; } - -int OCSP_REQUEST_print(bp, o) -BIO *bp; -OCSP_REQUEST* o; - { - int i,j,n; - long l; - char *s; - OCSP_CERTID* cid = NULL; - OCSP_ONEREQ *one = NULL; - OCSP_REQINFO *inf = o->tbsRequest; - OCSP_SIGNATURE *sig = o->optionalSignature; - - if (BIO_write(bp,"OCSP Request Data:\n",19) <= 0) goto err; - l=ASN1_INTEGER_get(inf->version); - if (BIO_printf(bp,"%4sVersion: %lu (0x%lx)","",l+1,l) <= 0) goto err; - if (inf->requestorName != NULL) - { - if (BIO_write(bp,"\n Requestor Name: ",21) <= 0) - goto err; - i2a_GENERAL_NAME(bp, inf->requestorName); - } - if (BIO_write(bp,"\n Requestor List:\n",21) <= 0) goto err; - for (i = 0; i < sk_OCSP_ONEREQ_num(inf->requestList); i++) - { - if (! sk_OCSP_ONEREQ_value(inf->requestList, i)) continue; - one = sk_OCSP_ONEREQ_value(inf->requestList, i); - cid = one->reqCert; - j=OBJ_obj2nid(cid->hashAlgorithm->algorithm); - if (BIO_printf(bp,"%8sHash Algorithm: %s","", - (j == NID_undef)?"UNKNOWN":OBJ_nid2ln(j)) <= 0) - goto err; - if (BIO_write(bp,"\n Issuer Name Hash: ",27) <= 0) - goto err; - i2a_ASN1_STRING(bp, cid->issuerNameHash, V_ASN1_OCTET_STRING); - if (BIO_write(bp,"\n Issuer Key Hash: ",26) <= 0) - goto err; - i2a_ASN1_STRING(bp, cid->issuerKeyHash, V_ASN1_OCTET_STRING); - if (BIO_write(bp,"\n Serial Number: ",24) <= 0) - goto err; - if (!i2a_ASN1_INTEGER(bp, cid->serialNumber)) - goto err; - if (!BIO_write(bp,"\n",1)) goto err; - if (!OCSP_extensions_print(bp, one->singleRequestExtensions, - "Request Single Extensions")) - goto err; - } - if (!OCSP_extensions_print(bp, inf->requestExtensions, - "Request Extensions")) - goto err; - if (sig) - { - i=OBJ_obj2nid(sig->signatureAlgorithm->algorithm); - if (BIO_printf(bp,"OCSP Request Signature Algorithm: %s", - (i == NID_undef)?"UNKNOWN":OBJ_nid2ln(i)) <= 0) - goto err; - n=sig->signature->length; - s=(char *)sig->signature->data; - for (i=0; i<n; i++) - { - if ((i%18) == 0) - if (BIO_write(bp,"\n ",9) <= 0) goto err; - if (BIO_printf(bp,"%02x%s",(unsigned char)s[i], - ((i+1) == n)?"":":") <= 0) goto err; - } - if (BIO_write(bp,"\n",1) != 1) goto err; - if (sig->certs) - { - for (i=0; i<sk_X509_num(sig->certs); i++) - if (sk_X509_value(sig->certs,i) != NULL) - X509_print(bp, - sk_X509_value(sig->certs,i)); - } - } - return 1; -err: - return 0; - } - int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o) { int i, j, n; |