Rename recently introduced functions for improved code clarity:
authorBodo Möller <bodo@openssl.org>
Mon, 3 Sep 2001 13:40:07 +0000 (13:40 +0000)
committerBodo Möller <bodo@openssl.org>
Mon, 3 Sep 2001 13:40:07 +0000 (13:40 +0000)
      [DR]SA_up  =>  [DR]SA_up_ref

crypto/dsa/dsa.h
crypto/dsa/dsa_lib.c
crypto/evp/p_lib.c
crypto/rsa/rsa.h
crypto/rsa/rsa_lib.c
ssl/s3_srvr.c
ssl/ssl_cert.c
ssl/ssl_rsa.c
util/libeay.num

index 7fc8fd303b6d50dd64dc4437b36977ac7bb0850b..e12cee0b75dfb85eeeb9d95174a5015e17eb2c61 100644 (file)
@@ -179,7 +179,7 @@ DSA *       DSA_new_method(struct engine_st *engine);
 #endif
 void   DSA_free (DSA *r);
 /* "up" the DSA object's reference count */
-int    DSA_up(DSA *r);
+int    DSA_up_ref(DSA *r);
 int    DSA_size(const DSA *);
        /* next 4 return -1 on error */
 int    DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
index bae39c20d4a502131507197b68518cc7e650df8a..365145a96b73710633c0cdd60cfbc8817cb2ead6 100644 (file)
@@ -226,7 +226,7 @@ void DSA_free(DSA *r)
        OPENSSL_free(r);
        }
 
-int DSA_up(DSA *r)
+int DSA_up_ref(DSA *r)
        {
        int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DSA);
 #ifdef REF_PRINT
@@ -235,7 +235,7 @@ int DSA_up(DSA *r)
 #ifdef REF_CHECK
        if (i < 2)
                {
-               fprintf(stderr, "DSA_up, bad reference count\n");
+               fprintf(stderr, "DSA_up_ref, bad reference count\n");
                abort();
                }
 #endif
index 86178f1db30f9d9ac00c0065e8a78a1dc93f709e..04f75a5a245cfc26cd486e32cac8fc66de44de03 100644 (file)
@@ -211,7 +211,7 @@ int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key)
 {
        int ret = EVP_PKEY_assign_RSA(pkey, key);
        if(ret)
-               RSA_up(key);
+               RSA_up_ref(key);
        return ret;
 }
 
@@ -221,7 +221,7 @@ RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey)
                EVPerr(EVP_F_EVP_PKEY_GET1_RSA, EVP_R_EXPECTING_AN_RSA_KEY);
                return NULL;
        }
-       RSA_up(pkey->pkey.rsa);
+       RSA_up_ref(pkey->pkey.rsa);
        return pkey->pkey.rsa;
 }
 #endif
@@ -231,7 +231,7 @@ int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key)
 {
        int ret = EVP_PKEY_assign_DSA(pkey, key);
        if(ret)
-               DSA_up(key);
+               DSA_up_ref(key);
        return ret;
 }
 
@@ -241,7 +241,7 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey)
                EVPerr(EVP_F_EVP_PKEY_GET1_DSA, EVP_R_EXPECTING_A_DSA_KEY);
                return NULL;
        }
-       DSA_up(pkey->pkey.dsa);
+       DSA_up_ref(pkey->pkey.dsa);
        return pkey->pkey.dsa;
 }
 #endif
index 9116a6e5679fbf56bb89f97057f05700609b3cf9..993b539b7a92d7c85ad02fc3e7302392bf2edcdd 100644 (file)
@@ -200,7 +200,7 @@ int RSA_private_decrypt(int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,int padding);
 void   RSA_free (RSA *r);
 /* "up" the RSA object's reference count */
-int    RSA_up(RSA *r);
+int    RSA_up_ref(RSA *r);
 
 int    RSA_flags(const RSA *r);
 
index e3368c1ee5ea12b490f2b91af39b676c779d5637..ef9f924ab45155e4b52d421767d7caa3160521f1 100644 (file)
@@ -246,7 +246,7 @@ void RSA_free(RSA *r)
        OPENSSL_free(r);
        }
 
-int RSA_up(RSA *r)
+int RSA_up_ref(RSA *r)
        {
        int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
 #ifdef REF_PRINT
@@ -255,7 +255,7 @@ int RSA_up(RSA *r)
 #ifdef REF_CHECK
        if (i < 2)
                {
-               fprintf(stderr, "RSA_up, bad reference count\n");
+               fprintf(stderr, "RSA_up_ref, bad reference count\n");
                abort();
                }
 #endif
index af65e2e68aee9416e39e65f34c904a194e3500fe..4d0d80065a8e80feff0546267e17cc2e7a95f605 100644 (file)
@@ -982,7 +982,7 @@ static int ssl3_send_server_key_exchange(SSL *s)
                                        SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ERROR_GENERATING_TMP_RSA_KEY);
                                        goto f_err;
                                }
-                               RSA_up(rsa);
+                               RSA_up_ref(rsa);
                                cert->rsa_tmp=rsa;
                                }
                        if (rsa == NULL)
index fcd6ff90b6f48487c0d9448596daeec0bd29ca11..6895f6216653f0325d4475af0cfc82e32d1555e0 100644 (file)
@@ -190,7 +190,7 @@ CERT *ssl_cert_dup(CERT *cert)
 #ifndef OPENSSL_NO_RSA
        if (cert->rsa_tmp != NULL)
                {
-               RSA_up(cert->rsa_tmp);
+               RSA_up_ref(cert->rsa_tmp);
                ret->rsa_tmp = cert->rsa_tmp;
                }
        ret->rsa_tmp_cb = cert->rsa_tmp_cb;
index e6d7f386b4d57dfb6cc92ba5037c8a00371c6eb8..b15dd506c9d84278549fe63a19b35d30a171a7a5 100644 (file)
@@ -170,7 +170,7 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa)
                return(0);
                }
 
-       RSA_up(rsa);
+       RSA_up_ref(rsa);
        EVP_PKEY_assign_RSA(pkey,rsa);
 
        ret=ssl_set_pkey(ssl->cert,pkey);
@@ -582,7 +582,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
                return(0);
                }
 
-       RSA_up(rsa);
+       RSA_up_ref(rsa);
        EVP_PKEY_assign_RSA(pkey,rsa);
 
        ret=ssl_set_pkey(ctx->cert, pkey);
index 3e274c9acc87ab08af5b3fcca9282fb0280a88df..6469927ee8389795cc73924b30f484600de28d39 100755 (executable)
@@ -2650,8 +2650,8 @@ EVP_dev_crypto_rc4                      3098      EXIST::FUNCTION:DES
 ENGINE_load_ciphers                     3099   EXIST::FUNCTION:
 ENGINE_get_cipher_by_name               3100   EXIST::FUNCTION:
 ENGINE_cipher_num                       3101   EXIST::FUNCTION:
-DH_up                                   3102   EXIST::FUNCTION:DH
-RSA_up                                  3103   EXIST::FUNCTION:RSA
+DH_up_ref                               3102   EXIST::FUNCTION:DH
+RSA_up_ref                              3103   EXIST::FUNCTION:RSA
 EVP_DigestInit_dbg                      3104   EXIST::FUNCTION:
 CRYPTO_cleanup_all_ex_data              3105   EXIST::FUNCTION:
 CRYPTO_set_ex_data_implementation       3106   EXIST::FUNCTION: