]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- fix error handling of alloc failure during rrsig verification.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 21 Jun 2012 07:22:01 +0000 (07:22 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 21 Jun 2012 07:22:01 +0000 (07:22 +0000)
git-svn-id: file:///svn/unbound/trunk@2693 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
validator/val_secalgo.c

index 10bc301186c8181fd201505687ad99028212b682..735a63ecd29c5dace21982f8bde1b82101b846be 100644 (file)
@@ -1,3 +1,6 @@
+21 June 2012: Wouter
+       - fix error handling of alloc failure during rrsig verification.
+
 20 June 2012: Wouter
        - work on --with-nss build option (for now, --with-libunbound-only).
 
index c64982404ba6ede1e45c61f0c134a27727d69165..b52abb4ffbf006f875dc9bfb80500fbd93b5379a 100644 (file)
@@ -299,7 +299,7 @@ setup_key_digest(int algo, EVP_PKEY** evp_key, const EVP_MD** digest_type,
                        *evp_key = EVP_PKEY_new();
                        if(!*evp_key) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        dsa = ldns_key_buf2dsa_raw(key, keylen);
                        if(!dsa) {
@@ -326,7 +326,7 @@ setup_key_digest(int algo, EVP_PKEY** evp_key, const EVP_MD** digest_type,
                        *evp_key = EVP_PKEY_new();
                        if(!*evp_key) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        rsa = ldns_key_buf2rsa_raw(key, keylen);
                        if(!rsa) {
@@ -358,7 +358,7 @@ setup_key_digest(int algo, EVP_PKEY** evp_key, const EVP_MD** digest_type,
                        *evp_key = EVP_PKEY_new();
                        if(!*evp_key) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        rsa = ldns_key_buf2rsa_raw(key, keylen);
                        if(!rsa) {
@@ -726,7 +726,7 @@ nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype,
                        *evp_key = EVP_PKEY_new();
                        if(!*evp_key) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        dsa = ldns_key_buf2dsa_raw(key, keylen);
                        if(!dsa) {
@@ -755,7 +755,7 @@ nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype,
                        *pubkey = nss_buf2rsa(key, keylen);
                        if(!*pubkey) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        /* select SHA version */
 #if defined(HAVE_EVP_SHA256) && defined(USE_SHA2)
@@ -775,7 +775,7 @@ nss_setup_key_digest(int algo, SECKEYPublicKey** pubkey, HASH_HashType* htype,
                        *pubkey = nss_buf2rsa(key, keylen);
                        if(!*pubkey) {
                                log_err("verify: malloc failure in crypto");
-                               return sec_status_unchecked;
+                               return 0;
                        }
                        *htype = HASH_AlgMD5;