diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/ocsp/ocsp_lib.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2 openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip |
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/ocsp/ocsp_lib.c')
-rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_lib.c b/src/lib/libcrypto/ocsp/ocsp_lib.c index 4a109b5513..d56a002096 100644 --- a/src/lib/libcrypto/ocsp/ocsp_lib.c +++ b/src/lib/libcrypto/ocsp/ocsp_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp_lib.c,v 1.19 2016/12/21 18:13:59 beck Exp $ */ | 1 | /* $OpenBSD: ocsp_lib.c,v 1.20 2017/01/29 17:49:23 beck Exp $ */ |
2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
3 | * project. */ | 3 | * project. */ |
4 | 4 | ||
@@ -115,7 +115,7 @@ OCSP_cert_id_new(const EVP_MD *dgst, X509_NAME *issuerName, | |||
115 | if (alg->algorithm != NULL) | 115 | if (alg->algorithm != NULL) |
116 | ASN1_OBJECT_free(alg->algorithm); | 116 | ASN1_OBJECT_free(alg->algorithm); |
117 | if ((nid = EVP_MD_type(dgst)) == NID_undef) { | 117 | if ((nid = EVP_MD_type(dgst)) == NID_undef) { |
118 | OCSPerr(OCSP_F_OCSP_CERT_ID_NEW, OCSP_R_UNKNOWN_NID); | 118 | OCSPerror(OCSP_R_UNKNOWN_NID); |
119 | goto err; | 119 | goto err; |
120 | } | 120 | } |
121 | if (!(alg->algorithm = OBJ_nid2obj(nid))) | 121 | if (!(alg->algorithm = OBJ_nid2obj(nid))) |
@@ -144,7 +144,7 @@ OCSP_cert_id_new(const EVP_MD *dgst, X509_NAME *issuerName, | |||
144 | return cid; | 144 | return cid; |
145 | 145 | ||
146 | digerr: | 146 | digerr: |
147 | OCSPerr(OCSP_F_OCSP_CERT_ID_NEW, OCSP_R_DIGEST_ERR); | 147 | OCSPerror(OCSP_R_DIGEST_ERR); |
148 | err: | 148 | err: |
149 | if (cid) | 149 | if (cid) |
150 | OCSP_CERTID_free(cid); | 150 | OCSP_CERTID_free(cid); |
@@ -193,11 +193,11 @@ OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl) | |||
193 | } else if (strncmp(url, "http://", 7) == 0) | 193 | } else if (strncmp(url, "http://", 7) == 0) |
194 | host = strdup(url + 7); | 194 | host = strdup(url + 7); |
195 | else { | 195 | else { |
196 | OCSPerr(OCSP_F_OCSP_PARSE_URL, OCSP_R_ERROR_PARSING_URL); | 196 | OCSPerror(OCSP_R_ERROR_PARSING_URL); |
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
199 | if (host == NULL) { | 199 | if (host == NULL) { |
200 | OCSPerr(OCSP_F_OCSP_PARSE_URL, ERR_R_MALLOC_FAILURE); | 200 | OCSPerror(ERR_R_MALLOC_FAILURE); |
201 | return 0; | 201 | return 0; |
202 | } | 202 | } |
203 | 203 | ||
@@ -221,7 +221,7 @@ OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl) | |||
221 | free(host); | 221 | free(host); |
222 | free(path); | 222 | free(path); |
223 | free(port); | 223 | free(port); |
224 | OCSPerr(OCSP_F_OCSP_PARSE_URL, ERR_R_MALLOC_FAILURE); | 224 | OCSPerror(ERR_R_MALLOC_FAILURE); |
225 | return 0; | 225 | return 0; |
226 | } | 226 | } |
227 | 227 | ||