aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-11-29 01:15:09 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-11-29 01:15:09 +0000
commitf404278186f9613706d4ddaf1a0670dabd44973f (patch)
tree46a6c6f2338a10c1b617d6307b70c51d565e6d15 /crypto
parent68f5500d31a3f5397924963ea4720a91a91971f2 (diff)
downloadopenssl-f404278186f9613706d4ddaf1a0670dabd44973f.tar.gz
add wrapper function for certificate download
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/x509.h1
-rw-r--r--crypto/x509/x_all.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 3805ab1b42..c913e3c39d 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -663,6 +663,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_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);
diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c
index e62cd31394..bb64c34f50 100644
--- a/crypto/x509/x_all.c
+++ b/crypto/x509/x_all.c
@@ -103,6 +103,12 @@ int X509_sign_ctx(X509 *x, EVP_MD_CTX *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,