diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-12-17 14:09:43 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-12-17 14:09:43 +0000 |
commit | 1f47ec53a2c12c1466cd502288fe17559ba8c6a1 (patch) | |
tree | 8235b0adae42b9d3728a09c27442e26b561294de /crypto/ocsp/ocsp_ext.c | |
parent | 959f67d6a4908639adbe52ca28bc365bdff8c2b7 (diff) | |
download | openssl-1f47ec53a2c12c1466cd502288fe17559ba8c6a1.tar.gz |
Redo OCSP response printing. Remove duplicate or
obsolete code. Delete some redundant files.
Diffstat (limited to 'crypto/ocsp/ocsp_ext.c')
-rw-r--r-- | crypto/ocsp/ocsp_ext.c | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/crypto/ocsp/ocsp_ext.c b/crypto/ocsp/ocsp_ext.c index aac4edb1e5..20a58a3c90 100644 --- a/crypto/ocsp/ocsp_ext.c +++ b/crypto/ocsp/ocsp_ext.c @@ -251,99 +251,3 @@ err: return NULL; } -int OCSP_extensions_print(BIO *bp, - STACK_OF(X509_EXTENSION) *sk, - char *title) - { - int i; - if (!sk) return 1; - if (BIO_printf(bp, "%s:\n", title) <= 0) return 0; - for (i=0; i<sk_X509_EXTENSION_num(sk); i++) - OCSP_extension_print(bp, sk_X509_EXTENSION_value(sk,i), 4); - return sk_X509_EXTENSION_num(sk); - } - -int OCSP_extension_print(BIO *bp, - X509_EXTENSION *x, - int ind) - { - int i, j; - STACK_OF(ASN1_OBJECT) *sk = NULL; - unsigned char *p; - OCSP_CRLID *crlid = NULL; - OCSP_SERVICELOC *sloc = NULL; - ASN1_GENERALIZEDTIME *gt = NULL; - - if (!x) return 1; - switch (OBJ_obj2nid(x->object)) - { - case NID_id_pkix_OCSP_Nonce: - if (BIO_printf(bp, "%*snonce: ", ind, "") <= 0) - goto err; - if (M_ASN1_OCTET_STRING_print(bp, x->value) <= 0) - goto err; - if (BIO_write(bp, "\n", 1) <= 0) goto err; - break; - case NID_id_pkix_OCSP_CrlID: - if (BIO_printf(bp, "%*scrlId:\n", ind, "") <= 0) - goto err; - p = x->value->data; - if (!(d2i_OCSP_CRLID(&crlid, &p, x->value->length))) - goto err; - if (!OCSP_CRLID_print(bp, crlid, (2*ind))) goto err; - OCSP_CRLID_free(crlid); - break; - case NID_id_pkix_OCSP_acceptableResponses: - if (BIO_printf(bp, - "%*sacceptable responses: ", - ind, "") <= 0) - goto err; - p = x->value->data; - if (!(d2i_ASN1_SET_OF_ASN1_OBJECT(&sk, &p, x->value->length, - d2i_ASN1_OBJECT, - ASN1_OBJECT_free, - V_ASN1_SEQUENCE, - V_ASN1_UNIVERSAL))) - goto err; - for (i = 0; i < sk_ASN1_OBJECT_num(sk); i++) - { - j=OBJ_obj2nid(sk_ASN1_OBJECT_value(sk,i)); - if (BIO_printf(bp," %s ", - (j == NID_undef)?"UNKNOWN": - OBJ_nid2ln(j)) <= 0) - goto err; - } - if (BIO_write(bp, "\n", 1) <= 0) goto err; - sk_ASN1_OBJECT_pop_free(sk, ASN1_OBJECT_free); - break; - case NID_id_pkix_OCSP_archiveCutoff: - if (BIO_printf(bp, "%*sarchive cutoff: ", ind, "")<=0) - goto err; - p = x->value->data; - if (!d2i_ASN1_GENERALIZEDTIME(>, &p, - x->value->length)) - goto err; - if (!ASN1_GENERALIZEDTIME_print(bp, gt)) goto err; - if (BIO_write(bp, "\n", 1) <= 0) goto err; - ASN1_GENERALIZEDTIME_free(gt); - break; - case NID_id_pkix_OCSP_serviceLocator: - if (BIO_printf(bp, "%*sservice locator:\n", ind, "") <= 0) - goto err; - p = x->value->data; - if (!d2i_OCSP_SERVICELOC(&sloc, &p, - x->value->length)) - goto err; - if (!OCSP_SERVICELOC_print(bp,sloc,(2*ind))) goto err; - OCSP_SERVICELOC_free(sloc); - break; - case NID_undef: - default: - if (BIO_printf(bp,"%*sunrecognized oid: ",ind,"") <= 0) - goto err; - break; - } - return 1; -err: - return 0; - } |