[openssl-commits] [openssl] master update

Dr. Stephen Henson steve at openssl.org
Sat Jan 9 21:57:59 UTC 2016


The branch master has been updated
       via  7ba4f9dda54c44261d0a2cf38a106f8d6daacc25 (commit)
       via  7a556fb6f863980f56deff268a46c75a6ccf74e4 (commit)
       via  c3be59a47cdb959e9bfc33880dc29b7b66334747 (commit)
       via  a9988d54f6e49db46671c3b90b7832c1c923b2b1 (commit)
       via  2854c7989db45d528b7e9b1f9f7f40112c316933 (commit)
      from  6ac11bd0b9252e4cf53cb0b914db98b401779c15 (commit)


- Log -----------------------------------------------------------------
commit 7ba4f9dda54c44261d0a2cf38a106f8d6daacc25
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Sat Jan 9 21:55:46 2016 +0000

    update ordinals
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit 7a556fb6f863980f56deff268a46c75a6ccf74e4
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Sat Jan 9 13:40:02 2016 +0000

    Add DEPRECATEDIN support.
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit c3be59a47cdb959e9bfc33880dc29b7b66334747
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Jan 8 01:31:39 2016 +0000

    Correct header defines
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit a9988d54f6e49db46671c3b90b7832c1c923b2b1
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Fri Jan 8 01:25:36 2016 +0000

    remove hard coded algorithms
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit 2854c7989db45d528b7e9b1f9f7f40112c316933
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Thu Jan 7 03:19:09 2016 +0000

    Recognise disabled algorithms automatically.
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

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

Summary of changes:
 include/openssl/evp.h |   2 +
 include/openssl/ssl.h |  10 ++-
 util/libeay.num       |  55 +++++++-------
 util/mkdef.pl         | 204 ++++++++++++++------------------------------------
 4 files changed, 91 insertions(+), 180 deletions(-)

diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index a4d2299..09a6962 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -675,6 +675,7 @@ __owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
 __owur int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
                                  size_t siglen);
 
+# ifndef OPENSSL_NO_RSA
 __owur int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
                         const unsigned char *ek, int ekl,
                         const unsigned char *iv, EVP_PKEY *priv);
@@ -684,6 +685,7 @@ __owur int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
                         unsigned char **ek, int *ekl, unsigned char *iv,
                         EVP_PKEY **pubk, int npubk);
 __owur int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
+# endif
 
 EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void);
 void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx);
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 39cb2e7..91931de 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1417,8 +1417,8 @@ void SSL_set_verify_depth(SSL *s, int depth);
 void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg);
 # ifndef OPENSSL_NO_RSA
 __owur int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
-# endif
 __owur int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len);
+# endif
 __owur int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
 __owur int SSL_use_PrivateKey_ASN1(int pk, SSL *ssl, const unsigned char *d,
                             long len);
@@ -1430,10 +1430,16 @@ __owur int SSL_CTX_use_serverinfo(SSL_CTX *ctx, const unsigned char *serverinfo,
                            size_t serverinfo_length);
 __owur int SSL_CTX_use_serverinfo_file(SSL_CTX *ctx, const char *file);
 
+#ifndef OPENSSL_NO_RSA
 __owur int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
+#endif
+
 __owur int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
 __owur int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
+
+#ifndef OPENSSL_NO_RSA
 __owur int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
+#endif
 __owur int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
 __owur int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
 /* PEM type */
@@ -1504,9 +1510,9 @@ void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg),
                          void *arg);
 # ifndef OPENSSL_NO_RSA
 __owur int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
-# endif
 __owur int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d,
                                    long len);
+# endif
 __owur int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
 __owur int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx,
                                 const unsigned char *d, long len);
diff --git a/util/libeay.num b/util/libeay.num
index 56331b0..d71e980 100755
--- a/util/libeay.num
+++ b/util/libeay.num
@@ -123,10 +123,10 @@ BN_dup                                  128	1_1_0	EXIST::FUNCTION:
 BN_free                                 129	1_1_0	EXIST::FUNCTION:
 BN_from_montgomery                      130	1_1_0	EXIST::FUNCTION:
 BN_gcd                                  131	1_1_0	EXIST::FUNCTION:
-BN_generate_prime                       132	1_1_0	NOEXIST::FUNCTION:
+BN_generate_prime                       132	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8
 BN_get_word                             133	1_1_0	EXIST::FUNCTION:
 BN_is_bit_set                           134	1_1_0	EXIST::FUNCTION:
-BN_is_prime                             135	1_1_0	NOEXIST::FUNCTION:
+BN_is_prime                             135	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8
 BN_lshift                               136	1_1_0	EXIST::FUNCTION:
 BN_lshift1                              137	1_1_0	EXIST::FUNCTION:
 BN_mask_bits                            138	1_1_0	EXIST::FUNCTION:
@@ -171,8 +171,8 @@ CRYPTO_mem_debug_realloc                179	1_1_0	EXIST::FUNCTION:CRYPTO_MDEBUG
 CRYPTO_dbg_remalloc                     180	1_1_0	NOEXIST::FUNCTION:
 CRYPTO_free                             181	1_1_0	EXIST::FUNCTION:
 CRYPTO_get_add_lock_callback            182	1_1_0	EXIST::FUNCTION:
-CRYPTO_get_id_callback                  183	1_1_0	NOEXIST::FUNCTION:
-CRYPTO_get_lock_name                    184	1_1_0	NOEXIST::FUNCTION:
+CRYPTO_get_id_callback                  183	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
+CRYPTO_get_lock_name                    184	1_1_0	EXIST::FUNCTION:
 CRYPTO_get_locking_callback             185	1_1_0	EXIST::FUNCTION:
 CRYPTO_get_mem_functions                186	1_1_0	EXIST::FUNCTION:
 CRYPTO_lock                             187	1_1_0	EXIST::FUNCTION:
@@ -184,22 +184,22 @@ CRYPTO_mem_leaks_fp                     192	1_1_0	EXIST::FUNCTION:CRYPTO_MDEBUG,
 CRYPTO_realloc                          193	1_1_0	EXIST::FUNCTION:
 CRYPTO_remalloc                         194	1_1_0	NOEXIST::FUNCTION:
 CRYPTO_set_add_lock_callback            195	1_1_0	EXIST::FUNCTION:
-CRYPTO_set_id_callback                  196	1_1_0	NOEXIST::FUNCTION:
+CRYPTO_set_id_callback                  196	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
 CRYPTO_set_locking_callback             197	1_1_0	EXIST::FUNCTION:
 CRYPTO_set_mem_functions                198	1_1_0	EXIST::FUNCTION:
-CRYPTO_thread_id                        199	1_1_0	NOEXIST::FUNCTION:
+CRYPTO_thread_id                        199	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
 DH_check                                200	1_1_0	EXIST::FUNCTION:DH
 DH_compute_key                          201	1_1_0	EXIST::FUNCTION:DH
 DH_free                                 202	1_1_0	EXIST::FUNCTION:DH
 DH_generate_key                         203	1_1_0	EXIST::FUNCTION:DH
-DH_generate_parameters                  204	1_1_0	NOEXIST::FUNCTION:
+DH_generate_parameters                  204	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8,DH
 DH_new                                  205	1_1_0	EXIST::FUNCTION:DH
 DH_size                                 206	1_1_0	EXIST::FUNCTION:DH
 DHparams_print                          207	1_1_0	EXIST::FUNCTION:DH
 DHparams_print_fp                       208	1_1_0	EXIST::FUNCTION:DH,STDIO
 DSA_free                                209	1_1_0	EXIST::FUNCTION:DSA
 DSA_generate_key                        210	1_1_0	EXIST::FUNCTION:DSA
-DSA_generate_parameters                 211	1_1_0	NOEXIST::FUNCTION:
+DSA_generate_parameters                 211	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8,DSA
 DSA_is_prime                            212	1_1_0	NOEXIST::FUNCTION:
 DSA_new                                 213	1_1_0	EXIST::FUNCTION:DSA
 DSA_print                               214	1_1_0	EXIST::FUNCTION:DSA
@@ -217,7 +217,7 @@ ERR_func_error_string                   225	1_1_0	EXIST::FUNCTION:
 ERR_get_err_state_table                 226	1_1_0	EXIST::FUNCTION:
 ERR_get_error                           227	1_1_0	EXIST::FUNCTION:
 ERR_get_error_line                      228	1_1_0	EXIST::FUNCTION:
-ERR_get_state                           229	1_1_0	NOEXIST::FUNCTION:
+ERR_get_state                           229	1_1_0	EXIST::FUNCTION:
 ERR_get_string_table                    230	1_1_0	EXIST::FUNCTION:
 ERR_lib_error_string                    231	1_1_0	EXIST::FUNCTION:
 ERR_load_ASN1_strings                   232	1_1_0	EXIST::FUNCTION:
@@ -242,7 +242,7 @@ ERR_print_errors                        250	1_1_0	EXIST::FUNCTION:
 ERR_print_errors_fp                     251	1_1_0	EXIST::FUNCTION:STDIO
 ERR_put_error                           252	1_1_0	EXIST::FUNCTION:
 ERR_reason_error_string                 253	1_1_0	EXIST::FUNCTION:
-ERR_remove_state                        254	1_1_0	NOEXIST::FUNCTION:
+ERR_remove_state                        254	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
 EVP_BytesToKey                          255	1_1_0	EXIST::FUNCTION:
 EVP_CIPHER_CTX_cleanup                  256	1_1_0	EXIST::FUNCTION:
 EVP_CipherFinal                         257	1_1_0	EXIST::FUNCTION:
@@ -457,7 +457,7 @@ RAND_cleanup                            465	1_1_0	EXIST::FUNCTION:
 RAND_file_name                          466	1_1_0	EXIST::FUNCTION:
 RAND_load_file                          467	1_1_0	EXIST::FUNCTION:
 RAND_screen                             468	1_1_0	EXIST:WIN32:FUNCTION:
-RAND_seed                               469	1_1_0	NOEXIST::FUNCTION:
+RAND_seed                               469	1_1_0	EXIST::FUNCTION:
 RAND_write_file                         470	1_1_0	EXIST::FUNCTION:
 RC2_cbc_encrypt                         471	1_1_0	EXIST::FUNCTION:RC2
 RC2_cfb64_encrypt                       472	1_1_0	EXIST::FUNCTION:RC2
@@ -473,7 +473,7 @@ RSAPrivateKey_dup                       481	1_1_0	EXIST::FUNCTION:RSA
 RSAPublicKey_dup                        482	1_1_0	EXIST::FUNCTION:RSA
 RSA_PKCS1_OpenSSL                       483	1_1_0	EXIST::FUNCTION:RSA
 RSA_free                                484	1_1_0	EXIST::FUNCTION:RSA
-RSA_generate_key                        485	1_1_0	NOEXIST::FUNCTION:
+RSA_generate_key                        485	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8,RSA
 RSA_new                                 486	1_1_0	EXIST::FUNCTION:RSA
 RSA_new_method                          487	1_1_0	EXIST::FUNCTION:RSA
 RSA_print                               488	1_1_0	EXIST::FUNCTION:RSA
@@ -942,7 +942,7 @@ EVP_rc2_40_cbc                          959	1_1_0	EXIST::FUNCTION:RC2
 EVP_rc4_40                              960	1_1_0	EXIST::FUNCTION:RC4
 EVP_CIPHER_CTX_init                     961	1_1_0	EXIST::FUNCTION:
 HMAC                                    962	1_1_0	EXIST::FUNCTION:
-HMAC_Init                               963	1_1_0	NOEXIST::FUNCTION:
+HMAC_Init                               963	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_1_0
 HMAC_Update                             964	1_1_0	EXIST::FUNCTION:
 HMAC_Final                              965	1_1_0	EXIST::FUNCTION:
 ERR_get_next_error_library              966	1_1_0	EXIST::FUNCTION:
@@ -1097,7 +1097,7 @@ bn_mul_part_recursive                   1125	1_1_0	NOEXIST::FUNCTION:
 bn_sqr_recursive                        1126	1_1_0	NOEXIST::FUNCTION:
 bn_mul_low_normal                       1127	1_1_0	NOEXIST::FUNCTION:
 BN_RECP_CTX_init                        1128	1_1_0	NOEXIST::FUNCTION:
-BN_RECP_CTX_new                         1129	1_1_0	NOEXIST::FUNCTION:
+BN_RECP_CTX_new                         1129	1_1_0	EXIST::FUNCTION:
 BN_RECP_CTX_free                        1130	1_1_0	EXIST::FUNCTION:
 BN_RECP_CTX_set                         1131	1_1_0	EXIST::FUNCTION:
 BN_mod_mul_reciprocal                   1132	1_1_0	EXIST::FUNCTION:
@@ -1220,8 +1220,8 @@ BIO_f_reliable                          1244	1_1_0	EXIST::FUNCTION:
 PKCS7_dataFinal                         1245	1_1_0	EXIST::FUNCTION:
 PKCS7_dataDecode                        1246	1_1_0	EXIST::FUNCTION:
 X509V3_EXT_CRL_add_conf                 1247	1_1_0	EXIST::FUNCTION:
-BN_set_params                           1248	1_1_0	NOEXIST::FUNCTION:
-BN_get_params                           1249	1_1_0	NOEXIST::FUNCTION:
+BN_set_params                           1248	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8
+BN_get_params                           1249	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8
 BIO_get_ex_num                          1250	1_1_0	NOEXIST::FUNCTION:
 BIO_set_ex_free_func                    1251	1_1_0	NOEXIST::FUNCTION:
 EVP_ripemd160                           1252	1_1_0	EXIST::FUNCTION:RMD160
@@ -1726,7 +1726,7 @@ BIO_number_written                      2202	1_1_0	EXIST::FUNCTION:
 BIO_number_read                         2203	1_1_0	EXIST::FUNCTION:
 X509_STORE_CTX_get1_chain               2204	1_1_0	EXIST::FUNCTION:
 ERR_load_RAND_strings                   2205	1_1_0	EXIST::FUNCTION:
-RAND_pseudo_bytes                       2206	1_1_0	NOEXIST::FUNCTION:
+RAND_pseudo_bytes                       2206	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_1_0
 X509_REQ_get_attr_by_NID                2207	1_1_0	EXIST::FUNCTION:
 X509_REQ_get_attr                       2208	1_1_0	EXIST::FUNCTION:
 X509_REQ_add1_attr_by_NID               2209	1_1_0	EXIST::FUNCTION:
@@ -1741,7 +1741,7 @@ X509_REQ_add1_attr_by_txt               2217	1_1_0	EXIST::FUNCTION:
 X509_ATTRIBUTE_create_by_txt            2218	1_1_0	EXIST::FUNCTION:
 X509at_add1_attr_by_txt                 2219	1_1_0	EXIST::FUNCTION:
 BN_pseudo_rand                          2239	1_1_0	EXIST::FUNCTION:
-BN_is_prime_fasttest                    2240	1_1_0	NOEXIST::FUNCTION:
+BN_is_prime_fasttest                    2240	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_0_9_8
 BN_CTX_end                              2241	1_1_0	EXIST::FUNCTION:
 BN_CTX_start                            2242	1_1_0	EXIST::FUNCTION:
 BN_CTX_get                              2243	1_1_0	EXIST::FUNCTION:
@@ -1994,7 +1994,7 @@ EC_GROUP_method_of                      2568	1_1_0	EXIST::FUNCTION:EC
 i2d_KRB5_APREQ                          2569	1_1_0	NOEXIST::FUNCTION:
 _ossl_old_des_encrypt                   2570	1_1_0	NOEXIST::FUNCTION:
 ASN1_PRINTABLE_new                      2571	1_1_0	EXIST::FUNCTION:
-HMAC_Init_ex                            2572	1_1_0	NOEXIST::FUNCTION:
+HMAC_Init_ex                            2572	1_1_0	EXIST::FUNCTION:
 d2i_KRB5_AUTHENT                        2573	1_1_0	NOEXIST::FUNCTION:
 OCSP_archive_cutoff_new                 2574	1_1_0	EXIST::FUNCTION:
 EC_POINT_set_Jprojective_coordinates_GFp 2575	1_1_0	EXIST:!VMS:FUNCTION:EC
@@ -2879,7 +2879,7 @@ STORE_method_set_list_start_function    3336	1_1_0	NOEXIST::FUNCTION:
 BN_BLINDING_invert_ex                   3337	1_1_0	EXIST::FUNCTION:
 NAME_CONSTRAINTS_free                   3338	1_1_0	EXIST::FUNCTION:
 STORE_ATTR_INFO_set_number              3339	1_1_0	NOEXIST::FUNCTION:
-BN_BLINDING_get_thread_id               3340	1_1_0	NOEXIST::FUNCTION:
+BN_BLINDING_get_thread_id               3340	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
 X509_STORE_CTX_set0_param               3341	1_1_0	EXIST::FUNCTION:
 POLICY_MAPPING_it                       3342	1_1_0	EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
 POLICY_MAPPING_it                       3342	1_1_0	EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
@@ -3255,8 +3255,8 @@ EC_KEY_set_public_key                   3682	1_1_0	EXIST::FUNCTION:EC
 PEM_read_ECPKParameters                 3683	1_1_0	EXIST::FUNCTION:EC
 X509_CERT_PAIR_new                      3684	1_1_0	NOEXIST::FUNCTION:
 ENGINE_register_STORE                   3685	1_1_0	EXIST::FUNCTION:ENGINE
-RSA_generate_key_ex                     3686	1_1_0	NOEXIST::FUNCTION:
-DSA_generate_parameters_ex              3687	1_1_0	NOEXIST::FUNCTION:
+RSA_generate_key_ex                     3686	1_1_0	EXIST::FUNCTION:RSA
+DSA_generate_parameters_ex              3687	1_1_0	EXIST::FUNCTION:DSA
 ECParameters_print_fp                   3688	1_1_0	EXIST::FUNCTION:EC,STDIO
 X509V3_NAME_from_section                3689	1_1_0	EXIST::FUNCTION:
 EVP_PKEY_add1_attr                      3690	1_1_0	EXIST::FUNCTION:
@@ -3281,10 +3281,10 @@ ECDSA_size                              3706	1_1_0	EXIST::FUNCTION:EC
 d2i_EC_PUBKEY_bio                       3707	1_1_0	EXIST::FUNCTION:EC
 BN_get0_nist_prime_521                  3708	1_1_0	EXIST::FUNCTION:
 STORE_ATTR_INFO_modify_sha1str          3709	1_1_0	NOEXIST::FUNCTION:
-BN_generate_prime_ex                    3710	1_1_0	NOEXIST::FUNCTION:
+BN_generate_prime_ex                    3710	1_1_0	EXIST::FUNCTION:
 EC_GROUP_new_by_curve_name              3711	1_1_0	EXIST::FUNCTION:EC
 SHA256_Final                            3712	1_1_0	EXIST::FUNCTION:
-DH_generate_parameters_ex               3713	1_1_0	NOEXIST::FUNCTION:
+DH_generate_parameters_ex               3713	1_1_0	EXIST::FUNCTION:DH
 PEM_read_bio_ECPrivateKey               3714	1_1_0	EXIST::FUNCTION:EC
 STORE_meth_get_cleanup_fn               3715	1_1_0	NOEXIST::FUNCTION:
 STORE_method_get_cleanup_function       3715	1_1_0	NOEXIST::FUNCTION:
@@ -3344,7 +3344,7 @@ pqueue_insert                           3766	1_1_0	EXIST::FUNCTION:
 pitem_free                              3767	1_1_0	EXIST::FUNCTION:
 BN_GF2m_mod_inv_arr                     3768	1_1_0	EXIST::FUNCTION:EC2M
 ENGINE_unregister_ECDSA                 3769	1_1_0	NOEXIST::FUNCTION:
-BN_BLINDING_set_thread_id               3770	1_1_0	NOEXIST::FUNCTION:
+BN_BLINDING_set_thread_id               3770	1_1_0	EXIST::FUNCTION:DEPRECATEDIN_1_0_0
 get_rfc3526_prime_8192                  3771	1_1_0	EXIST::FUNCTION:
 X509_VERIFY_PARAM_clear_flags           3772	1_1_0	EXIST::FUNCTION:
 get_rfc2409_prime_1024                  3773	1_1_0	EXIST::FUNCTION:
@@ -3832,7 +3832,7 @@ d2i_TS_MSG_IMPRINT                      4235	1_1_0	EXIST::FUNCTION:
 EVP_PKEY_meth_set_ctrl                  4236	1_1_0	EXIST::FUNCTION:
 TS_REQ_get_ext_by_NID                   4237	1_1_0	EXIST::FUNCTION:
 PKCS5_pbe_set0_algor                    4238	1_1_0	EXIST::FUNCTION:
-BN_BLINDING_thread_id                   4239	1_1_0	NOEXIST::FUNCTION:
+BN_BLINDING_thread_id                   4239	1_1_0	EXIST::FUNCTION:
 TS_ACCURACY_new                         4240	1_1_0	EXIST::FUNCTION:
 X509_CRL_METHOD_free                    4241	1_1_0	EXIST::FUNCTION:
 ASN1_PCTX_get_nm_flags                  4242	1_1_0	EXIST::FUNCTION:
@@ -4723,6 +4723,3 @@ CRYPTO_clear_realloc                    5117	1_1_0	EXIST::FUNCTION:
 CRYPTO_mem_debug_push                   5118	1_1_0	EXIST::FUNCTION:CRYPTO_MDEBUG
 CRYPTO_set_mem_debug                    5119	1_1_0	EXIST::FUNCTION:
 CRYPTO_mem_debug_pop                    5120	1_1_0	EXIST::FUNCTION:CRYPTO_MDEBUG
-DEPRECATEDIN_1_0_0                      5121	1_1_0	EXIST::FUNCTION:
-DEPRECATEDIN_0_9_8                      5122	1_1_0	EXIST::FUNCTION:DH,DSA,RSA
-DEPRECATEDIN_1_1_0                      5123	1_1_0	EXIST::FUNCTION:
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 9478f30..0c38934 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -101,7 +101,9 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
 			 # NEXTPROTONEG
 			 "NEXTPROTONEG",
 			 # Deprecated functions
-			 "DEPRECATED",
+			 "DEPRECATEDIN_0_9_8",
+			 "DEPRECATEDIN_1_0_0",
+			 "DEPRECATEDIN_1_1_0",
 			 # SCTP
 		 	 "SCTP",
 			 # SRTP
@@ -116,6 +118,12 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                          "APPLINK"
                      );
 
+my %disabled_algorithms;
+
+foreach (@known_algorithms) {
+    $disabled_algorithms{$_} = 0;
+}
+
 my $options="";
 open(IN,"<Makefile") || die "unable to open Makefile!\n";
 while(<IN>) {
@@ -123,24 +131,8 @@ while(<IN>) {
 }
 close(IN);
 
-# The following ciphers may be excluded (by Configure). This means functions
-# defined with ifndef(NO_XXX) are not included in the .def file, and everything
-# in directory xxx is ignored.
-my $no_rc2; my $no_rc4; my $no_rc5; my $no_idea; my $no_des; my $no_bf;
-my $no_cast; my $no_whirlpool; my $no_camellia; my $no_seed;
-my $no_md2; my $no_md4; my $no_md5; my $no_sha; my $no_ripemd; my $no_mdc2;
-my $no_rsa; my $no_dsa; my $no_dh; my $no_aes; my $no_scrypt;
-my $no_ec; my $no_engine; my $no_hw;
-my $no_chacha; my $no_poly1305;
-my $no_fp_api; my $no_static_engine=1; my $no_deprecated;
-my $no_sct; my $no_rfc3779; my $no_psk; my $no_cms; my $no_capieng;
-my $no_jpake; my $no_srp; my $no_ec2m; my $no_nistp_gcc; 
-my $no_nextprotoneg; my $no_sctp; my $no_srtp; my $no_ssl_trace;
-my $no_unit_test; my $no_ssl3_method; my $no_ocb; my $no_crypto_mdebug;
-
 my $zlib;
 
-
 foreach (@ARGV, split(/ /, $options))
 	{
 	$debug=1 if $_ eq "debug";
@@ -178,69 +170,37 @@ foreach (@ARGV, split(/ /, $options))
 		$do_crypto=1;
 		$libname=$_;
 	}
-	$no_static_engine=1 if $_ eq "no-static-engine";
-	$no_static_engine=0 if $_ eq "enable-static-engine";
 	$do_update=1 if $_ eq "update";
 	$do_rewrite=1 if $_ eq "rewrite";
 	$do_ctest=1 if $_ eq "ctest";
 	$do_ctestall=1 if $_ eq "ctestall";
 	$do_checkexist=1 if $_ eq "exist";
 	#$safe_stack_def=1 if $_ eq "-DDEBUG_SAFESTACK";
-
-	if    (/^no-rc2$/)      { $no_rc2=1; }
-	elsif (/^no-rc4$/)      { $no_rc4=1; }
-	elsif (/^no-rc5$/)      { $no_rc5=1; }
-	elsif (/^no-idea$/)     { $no_idea=1; }
-	elsif (/^no-des$/)      { $no_des=1; $no_mdc2=1; }
-	elsif (/^no-bf$/)       { $no_bf=1; }
-	elsif (/^no-cast$/)     { $no_cast=1; }
-	elsif (/^no-whirlpool$/)     { $no_whirlpool=1; }
-	elsif (/^no-md2$/)      { $no_md2=1; }
-	elsif (/^no-md4$/)      { $no_md4=1; }
-	elsif (/^no-md5$/)      { $no_md5=1; }
-	elsif (/^no-sha$/)      { $no_sha=1; }
-	elsif (/^no-ripemd$/)   { $no_ripemd=1; }
-	elsif (/^no-mdc2$/)     { $no_mdc2=1; }
-	elsif (/^no-rsa$/)      { $no_rsa=1; }
-	elsif (/^no-dsa$/)      { $no_dsa=1; }
-	elsif (/^no-dh$/)       { $no_dh=1; }
-	elsif (/^no-ec$/)       { $no_ec=1; }
-	elsif (/^no-aes$/)	{ $no_aes=1; }
-	elsif (/^no-camellia$/)	{ $no_camellia=1; }
-	elsif (/^no-seed$/)     { $no_seed=1; }
-	elsif (/^no-scrypt$/)   { $no_scrypt=1; }
-	elsif (/^no-chacha$/)   { $no_chacha=1; }
-	elsif (/^no-poly1305$/) { $no_poly1305=1; }
-	elsif (/^no-evp$/)	{ $no_evp=1; }
-	elsif (/^no-lhash$/)	{ $no_lhash=1; }
-	elsif (/^no-stack$/)	{ $no_stack=1; }
-	elsif (/^no-err$/)	{ $no_err=1; }
-	elsif (/^no-buffer$/)	{ $no_buffer=1; }
-	elsif (/^no-bio$/)	{ $no_bio=1; }
-	#elsif (/^no-locking$/)	{ $no_locking=1; }
-	elsif (/^no-comp$/)	{ $no_comp=1; }
-	elsif (/^no-dso$/)	{ $no_dso=1; }
-	elsif (/^no-engine$/)	{ $no_engine=1; }
-	elsif (/^no-hw$/)	{ $no_hw=1; }
-	elsif (/^no-sct$/)	{ $no_sct=1; }
-	elsif (/^no-rfc3779$/)	{ $no_rfc3779=1; }
-	elsif (/^no-cms$/)	{ $no_cms=1; }
-	elsif (/^no-ec2m$/)	{ $no_ec2m=1; }
- 	elsif (/^no-ec-nistp224-64-gcc-128$/)	{ $no_nistp_gcc=1; }
-	elsif (/^no-nextprotoneg$/)	{ $no_nextprotoneg=1; }
-	elsif (/^no-ssl3-method$/) { $no_ssl3_method=1; }
-	elsif (/^no-ssl-trace$/) { $no_ssl_trace=1; }
-	elsif (/^no-capieng$/)	{ $no_capieng=1; }
-	elsif (/^no-jpake$/)	{ $no_jpake=1; }
-	elsif (/^no-srp$/)	{ $no_srp=1; }
-	elsif (/^no-sctp$/)	{ $no_sctp=1; }
-	elsif (/^no-srtp$/)	{ $no_srtp=1; }
-	elsif (/^no-unit-test$/){ $no_unit_test=1; }
-	elsif (/^no-deprecated$/) { $no_deprecated=1; }
-	elsif (/^no-ocb/){ $no_ocb=1; }
-	elsif (/^no-crypto-mdebug/){ $no_crypto_mdebug=1; }
+	if (/^--api=(\d+)\.(\d+)\.(\d+)$/) {
+		my $apiv = sprintf "%x%02x%02x", $1, $2, $3;
+		foreach (keys %disabled_algorithms) {
+			if (/^DEPRECATEDIN_(\d+)_(\d+)_(\d+)$/) {
+				my $depv = sprintf "%x%02x%02x", $1, $2, $3;
+				$disabled_algorithms{$_} = 1 if $apiv ge $depv;
+			}
+		}
+	}
+	if (/^no-deprecated$/) {
+		foreach (keys %disabled_algorithms) {
+			if (/^DEPRECATEDIN_/) {
+				$disabled_algorithms{$_} = 1;
+			}
+		}
+	}
+	elsif (/^(enable|disable|no)-(.*)$/) {
+		my $alg = uc $2;
+        $alg =~ tr/-/_/;
+		if (exists $disabled_algorithms{$alg}) {
+			$disabled_algorithms{$alg} = $1 eq "enable" ? 0 : 1;
+		}
 	}
 
+	}
 
 if (!$libname) { 
 	if ($do_ssl) {
@@ -496,14 +456,15 @@ sub do_defs
 		print STDERR "DEBUG: parsing ----------\n" if $debug;
 		while(<IN>) {
 			if($parens > 0) {
-				#Inside a DECLARE_DEPRECATED
+				#Inside a DEPRECATEDIN
 				$stored_multiline .= $_;
 				chomp $stored_multiline;
-				print STDERR "DEBUG: Continuing multiline DEPRECATED: $stored_multiline\n" if $debug;
+				print STDERR "DEBUG: Continuing multiline DEPRECATEDIN: $stored_multiline\n" if $debug;
 				$parens = count_parens($stored_multiline);
 				if ($parens == 0) {
-					$stored_multiline =~ /^\s*DECLARE_DEPRECATED\s*\(\s*(\w*(\s|\*|\w)*)/;
-					$def .= "$1(void);";
+					$def .= do_deprecated($stored_multiline,
+							\@current_platforms,
+							\@current_algorithms);
 				}
 				next;
 			}
@@ -897,14 +858,16 @@ sub do_defs
 					&$make_variant("_shadow_$2","_shadow_$2",
 						      "EXPORT_VAR_AS_FUNCTION",
 						      "FUNCTION");
-				} elsif (/^\s*DECLARE_DEPRECATED\s*\(\s*(\w*(\s|\*|\w)*)/) {
+				} elsif (/^\s*DEPRECATEDIN/) {
 					$parens = count_parens($_);
 					if ($parens == 0) {
-						$def .= "$1(void);";
+						$def .= do_deprecated($_,
+							\@current_platforms,
+							\@current_algorithms);
 					} else {
 						$stored_multiline = $_;
 						chomp $stored_multiline;
-						print STDERR "DEBUG: Found multiline DEPRECATED starting with: $stored_multiline\n" if $debug;
+						print STDERR "DEBUG: Found multiline DEPRECATEDIN starting with: $stored_multiline\n" if $debug;
 						next;
 					}
 				} elsif ($tag{'CONST_STRICT'} != 1) {
@@ -969,21 +932,6 @@ sub do_defs
 
 			$p = $plats;
 			$a = $algs;
-			$a .= ",BF" if($s =~ /EVP_bf/);
-			$a .= ",CAST" if($s =~ /EVP_cast/);
-			$a .= ",DES" if($s =~ /EVP_des/);
-			$a .= ",DSA" if($s =~ /EVP_dss/);
-			$a .= ",IDEA" if($s =~ /EVP_idea/);
-			$a .= ",MD2" if($s =~ /EVP_md2/);
-			$a .= ",MD4" if($s =~ /EVP_md4/);
-			$a .= ",MD5" if($s =~ /EVP_md5/);
-			$a .= ",RC2" if($s =~ /EVP_rc2/);
-			$a .= ",RC4" if($s =~ /EVP_rc4/);
-			$a .= ",RC5" if($s =~ /EVP_rc5/);
-			$a .= ",RMD160" if($s =~ /EVP_ripemd/);
-			$a .= ",RSA" if($s =~ /EVP_(Open|Seal)(Final|Init)/);
-			$a .= ",RSA" if($s =~ /RSAPrivateKey/);
-			$a .= ",RSA" if($s =~ /SSLv23?_((client|server)_)?method/);
 
 			$platform{$s} =
 			    &reduce_platforms((defined($platform{$s})?$platform{$s}.',':"").$p);
@@ -1169,61 +1117,7 @@ sub is_valid
 			return 0;
 		} else {
 			# algorithms
-			if ($keyword eq "RC2" && $no_rc2) { return 0; }
-			if ($keyword eq "RC4" && $no_rc4) { return 0; }
-			if ($keyword eq "RC5" && $no_rc5) { return 0; }
-			if ($keyword eq "IDEA" && $no_idea) { return 0; }
-			if ($keyword eq "DES" && $no_des) { return 0; }
-			if ($keyword eq "BF" && $no_bf) { return 0; }
-			if ($keyword eq "CAST" && $no_cast) { return 0; }
-			if ($keyword eq "MD2" && $no_md2) { return 0; }
-			if ($keyword eq "MD4" && $no_md4) { return 0; }
-			if ($keyword eq "MD5" && $no_md5) { return 0; }
-			if ($keyword eq "SHA" && $no_sha) { return 0; }
-			if ($keyword eq "RMD160" && $no_ripemd) { return 0; }
-			if ($keyword eq "MDC2" && $no_mdc2) { return 0; }
-			if ($keyword eq "WHIRLPOOL" && $no_whirlpool) { return 0; }
-			if ($keyword eq "RSA" && $no_rsa) { return 0; }
-			if ($keyword eq "DSA" && $no_dsa) { return 0; }
-			if ($keyword eq "DH" && $no_dh) { return 0; }
-			if ($keyword eq "EC" && $no_ec) { return 0; }
-			if ($keyword eq "AES" && $no_aes) { return 0; }
-			if ($keyword eq "CAMELLIA" && $no_camellia) { return 0; }
-			if ($keyword eq "SEED" && $no_seed) { return 0; }
-			if ($keyword eq "SCRYPT" && $no_scrypt) { return 0; }
-			if ($keyword eq "CHACHA" && $no_chacha) { return 0; }
-			if ($keyword eq "POLY1305" && $no_poly1305) { return 0; }
-			if ($keyword eq "EVP" && $no_evp) { return 0; }
-			if ($keyword eq "LHASH" && $no_lhash) { return 0; }
-			if ($keyword eq "STACK" && $no_stack) { return 0; }
-			if ($keyword eq "ERR" && $no_err) { return 0; }
-			if ($keyword eq "BUFFER" && $no_buffer) { return 0; }
-			if ($keyword eq "BIO" && $no_bio) { return 0; }
-			if ($keyword eq "COMP" && $no_comp) { return 0; }
-			if ($keyword eq "DSO" && $no_dso) { return 0; }
-			if ($keyword eq "ENGINE" && $no_engine) { return 0; }
-			if ($keyword eq "HW" && $no_hw) { return 0; }
-			if ($keyword eq "FP_API" && $no_fp_api) { return 0; }
-			if ($keyword eq "STATIC_ENGINE" && $no_static_engine) { return 0; }
-			if ($keyword eq "SCT" && $no_sct) { return 0; }
-			if ($keyword eq "RFC3779" && $no_rfc3779) { return 0; }
-			if ($keyword eq "PSK" && $no_psk) { return 0; }
-			if ($keyword eq "CMS" && $no_cms) { return 0; }
-			if ($keyword eq "EC_NISTP_64_GCC_128" && $no_nistp_gcc)
-					{ return 0; }
-			if ($keyword eq "EC2M" && $no_ec2m) { return 0; }
-			if ($keyword eq "NEXTPROTONEG" && $no_nextprotoneg) { return 0; }
-			if ($keyword eq "SSL3_METHOD" && $no_ssl3_method) { return 0; }
-			if ($keyword eq "SSL_TRACE" && $no_ssl_trace) { return 0; }
-			if ($keyword eq "CAPIENG" && $no_capieng) { return 0; }
-			if ($keyword eq "JPAKE" && $no_jpake) { return 0; }
-			if ($keyword eq "SRP" && $no_srp) { return 0; }
-			if ($keyword eq "SCTP" && $no_sctp) { return 0; }
-			if ($keyword eq "SRTP" && $no_srtp) { return 0; }
-			if ($keyword eq "UNIT_TEST" && $no_unit_test) { return 0; }
-			if ($keyword eq "DEPRECATED" && $no_deprecated) { return 0; }
-			if ($keyword eq "OCB" && $no_ocb) { return 0; }
-			if ($keyword eq "CRYPTO_MDEBUG" && $no_crypto_mdebug) { return 0; }
+			if ($disabled_algorithms{$keyword} == 1) { return 0;}
 
 			# Nothing recognise as true
 			return 1;
@@ -1783,3 +1677,15 @@ sub check_version_lte()
 			if (($cvbase ne $tvbase) && ($tvletter gt $cvletter));
 	}
 }
+
+sub do_deprecated()
+{
+	my ($decl, $plats, $algs) = @_;
+	$decl =~ /^\s*(DEPRECATEDIN_\d_\d_\d)\s*\((.*)\)\s*$/;
+	my $info1 .= "#INFO:";
+	$info1 .= join(',', @{$plats}) . ":";
+	my $info2 = $info1;
+	$info1 .= join(',',@{$algs}, $1) . ";";
+	$info2 .= join(',',@{$algs}) . ";";
+	return $info1 . $2 . ";" . $info2;
+}


More information about the openssl-commits mailing list