[openssl-commits] [openssl] master update

Kurt Roeckx kurt at openssl.org
Sat Jan 23 20:05:47 UTC 2016


The branch master has been updated
       via  de42e71701ff9f7af97e3c8904f12c55549c2503 (commit)
      from  33a23fa6afe355304e02b7abb96acdbc5fc6c5c2 (commit)


- Log -----------------------------------------------------------------
commit de42e71701ff9f7af97e3c8904f12c55549c2503
Author: Todd Short <tshort at akamai.com>
Date:   Thu Jan 21 14:26:53 2016 -0500

    Fix store with opaque data
    
    When experimental-store is enabled, it does not compile due to the
    change to opaque data structures.
    
    Change CRYPTO_add() to EVP_PKEY_up_ref() as needed.
    
    Signed-off-by: Kurt Roeckx <kurt at roeckx.be>
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    
    RT: #4263, GH: #579

-----------------------------------------------------------------------

Summary of changes:
 crypto/store/str_lib.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/crypto/store/str_lib.c b/crypto/store/str_lib.c
index 018e667..711eb73 100644
--- a/crypto/store/str_lib.c
+++ b/crypto/store/str_lib.c
@@ -420,7 +420,7 @@ EVP_PKEY *STORE_generate_key(STORE *s, OPENSSL_ITEM attributes[],
         STOREerr(STORE_F_STORE_GENERATE_KEY, STORE_R_FAILED_GENERATING_KEY);
         return 0;
     }
-    CRYPTO_add(&object->data.key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(object->data.key);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -444,7 +444,7 @@ EVP_PKEY *STORE_get_private_key(STORE *s, OPENSSL_ITEM attributes[],
         STOREerr(STORE_F_STORE_GET_PRIVATE_KEY, STORE_R_FAILED_GETTING_KEY);
         return 0;
     }
-    CRYPTO_add(&object->data.key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(object->data.key);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -474,7 +474,7 @@ int STORE_store_private_key(STORE *s, EVP_PKEY *data,
         return 0;
     }
 
-    CRYPTO_add(&data->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(data);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -578,7 +578,7 @@ EVP_PKEY *STORE_list_private_key_next(STORE *s, void *handle)
                  STORE_R_FAILED_LISTING_KEYS);
         return 0;
     }
-    CRYPTO_add(&object->data.key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(object->data.key);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -628,7 +628,7 @@ EVP_PKEY *STORE_get_public_key(STORE *s, OPENSSL_ITEM attributes[],
         STOREerr(STORE_F_STORE_GET_PUBLIC_KEY, STORE_R_FAILED_GETTING_KEY);
         return 0;
     }
-    CRYPTO_add(&object->data.key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(object->data.key);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -658,7 +658,7 @@ int STORE_store_public_key(STORE *s, EVP_PKEY *data,
         return 0;
     }
 
-    CRYPTO_add(&data->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(data);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif
@@ -762,7 +762,7 @@ EVP_PKEY *STORE_list_public_key_next(STORE *s, void *handle)
                  STORE_R_FAILED_LISTING_KEYS);
         return 0;
     }
-    CRYPTO_add(&object->data.key->references, 1, CRYPTO_LOCK_EVP_PKEY);
+    EVP_PKEY_up_ref(object->data.key);
 #ifdef REF_PRINT
     REF_PRINT("EVP_PKEY", data);
 #endif


More information about the openssl-commits mailing list