1 |
wellsi |
1.1 |
diff -up openssl-fips-0.9.8e/CHANGES.ocsp-dos openssl-fips-0.9.8e/CHANGES |
2 |
|
|
diff -up openssl-fips-0.9.8e/crypto/asn1/a_verify.c.ocsp-dos openssl-fips-0.9.8e/crypto/asn1/a_verify.c |
3 |
|
|
--- openssl-fips-0.9.8e/crypto/asn1/a_verify.c.ocsp-dos 2005-05-09 02:27:32.000000000 +0200 |
4 |
|
|
+++ openssl-fips-0.9.8e/crypto/asn1/a_verify.c 2013-02-25 11:34:37.011201995 +0100 |
5 |
|
|
@@ -133,6 +133,12 @@ int ASN1_item_verify(const ASN1_ITEM *it |
6 |
|
|
unsigned char *buf_in=NULL; |
7 |
|
|
int ret= -1,i,inl; |
8 |
|
|
|
9 |
|
|
+ if (!pkey) |
10 |
|
|
+ { |
11 |
|
|
+ ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER); |
12 |
|
|
+ return -1; |
13 |
|
|
+ } |
14 |
|
|
+ |
15 |
|
|
EVP_MD_CTX_init(&ctx); |
16 |
|
|
i=OBJ_obj2nid(a->algorithm); |
17 |
|
|
type=EVP_get_digestbyname(OBJ_nid2sn(i)); |
18 |
|
|
diff -up openssl-fips-0.9.8e/crypto/ocsp/ocsp_vfy.c.ocsp-dos openssl-fips-0.9.8e/crypto/ocsp/ocsp_vfy.c |
19 |
|
|
--- openssl-fips-0.9.8e/crypto/ocsp/ocsp_vfy.c.ocsp-dos 2006-11-13 14:23:05.000000000 +0100 |
20 |
|
|
+++ openssl-fips-0.9.8e/crypto/ocsp/ocsp_vfy.c 2013-02-25 11:34:38.363204929 +0100 |
21 |
|
|
@@ -91,9 +91,12 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs |
22 |
|
|
{ |
23 |
|
|
EVP_PKEY *skey; |
24 |
|
|
skey = X509_get_pubkey(signer); |
25 |
|
|
- ret = OCSP_BASICRESP_verify(bs, skey, 0); |
26 |
|
|
- EVP_PKEY_free(skey); |
27 |
|
|
- if(ret <= 0) |
28 |
|
|
+ if (skey) |
29 |
|
|
+ { |
30 |
|
|
+ ret = OCSP_BASICRESP_verify(bs, skey, 0); |
31 |
|
|
+ EVP_PKEY_free(skey); |
32 |
|
|
+ } |
33 |
|
|
+ if(!skey || ret <= 0) |
34 |
|
|
{ |
35 |
|
|
OCSPerr(OCSP_F_OCSP_BASIC_VERIFY, OCSP_R_SIGNATURE_FAILURE); |
36 |
|
|
goto end; |