add wrapper function for certificate download
authorDr. Stephen Henson <steve@openssl.org>
Thu, 29 Nov 2012 01:15:09 +0000 (01:15 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 15 Jan 2013 18:01:54 +0000 (18:01 +0000)
crypto/x509/x509.h
crypto/x509/x_all.c

index 78c1866..45b4f15 100644 (file)
@@ -662,6 +662,7 @@ int X509_signature_print(BIO *bp,X509_ALGOR *alg, ASN1_STRING *sig);
 
 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
 
 int X509_sign(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
 int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
+int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert);
 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md);
 int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
 int X509_CRL_sign(X509_CRL *x, EVP_PKEY *pkey, const EVP_MD *md);
index e62cd31..bb64c34 100644 (file)
@@ -103,6 +103,12 @@ int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx)
                x->sig_alg, x->signature, x->cert_info, ctx);
        }
 
                x->sig_alg, x->signature, x->cert_info, ctx);
        }
 
+int X509_http_nbio(OCSP_REQ_CTX *rctx, X509 **pcert)
+       {
+       return OCSP_REQ_CTX_nbio_d2i(rctx,
+                               (ASN1_VALUE **)pcert, ASN1_ITEM_rptr(X509));
+       }
+
 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md)
        {
        return(ASN1_item_sign(ASN1_ITEM_rptr(X509_REQ_INFO),x->sig_alg, NULL,
 int X509_REQ_sign(X509_REQ *x, EVP_PKEY *pkey, const EVP_MD *md)
        {
        return(ASN1_item_sign(ASN1_ITEM_rptr(X509_REQ_INFO),x->sig_alg, NULL,