X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Focsp%2Focsp_ext.c;h=72d21796d2483b559db90fd8a80e111d01229cb4;hp=151cafaca45d0e34c2dc50989f5116381205d862;hb=a026fbf977ccac5c59597c9b2e1e1c288d0b1b69;hpb=c47ba4e96c7aa9c2f741f8c89b6440ed2c13b91c diff --git a/crypto/ocsp/ocsp_ext.c b/crypto/ocsp/ocsp_ext.c index 151cafaca4..72d21796d2 100644 --- a/crypto/ocsp/ocsp_ext.c +++ b/crypto/ocsp/ocsp_ext.c @@ -256,6 +256,9 @@ static int ocsp_add1_nonce(STACK_OF(X509_EXTENSION) **exts, * relies on library internals. */ os.length = ASN1_object_size(0, len, V_ASN1_OCTET_STRING); + if (os.length < 0) + goto err; + os.data = OPENSSL_malloc(os.length); if (os.data == NULL) goto err; @@ -354,7 +357,7 @@ int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req) return OCSP_BASICRESP_add_ext(resp, req_ext, -1); } -X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim) +X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim) { X509_EXTENSION *x = NULL; OCSP_CRLID *cid = NULL; @@ -427,7 +430,7 @@ X509_EXTENSION *OCSP_archive_cutoff_new(char *tim) * two--NID_ad_ocsp, NID_id_ad_caIssuers--and GeneralName value. This method * forces NID_ad_ocsp and uniformResourceLocator [6] IA5String. */ -X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, char **urls) +X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, const char **urls) { X509_EXTENSION *x = NULL; ASN1_IA5STRING *ia5 = NULL;