[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Fri Apr 22 13:44:05 UTC 2016


The branch master has been updated
       via  f0483bf7d2ffdf1b92c71318678a61603a9fa56d (commit)
       via  54c010ab8079828630cb0258f8ea6ab5cb9bfce8 (commit)
       via  04e381ff176060b7dbfe31a357101e42a2b32a96 (commit)
      from  b04e5c12c27ec3a1811091bf55b27c99f61a939f (commit)


- Log -----------------------------------------------------------------
commit f0483bf7d2ffdf1b92c71318678a61603a9fa56d
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Apr 22 12:23:07 2016 +0100

    Fix capi engine for no-dsa
    
    The capi engine was failing to compile on Windows if the no-dsa option
    was selected.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

commit 54c010ab8079828630cb0258f8ea6ab5cb9bfce8
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Apr 22 12:10:19 2016 +0100

    Fix no-dsa on Windows/VMS
    
    The no-dsa option was failing on Windows because some symbols were not
    correctly flagged in libcrypto.num. Problem found due to the new symbol
    consistency test.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

commit 04e381ff176060b7dbfe31a357101e42a2b32a96
Author: Matt Caswell <matt at openssl.org>
Date:   Fri Apr 22 12:09:49 2016 +0100

    Fix the indentation of OPENSSL_NO_STDIO in pem.h
    
    Some pre-processor macros were incorrectly indented
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

Summary of changes:
 engines/e_capi.c      | 22 ++++++++++++++++++++++
 include/openssl/pem.h |  8 +++++---
 util/libcrypto.num    | 16 ++++++++--------
 3 files changed, 35 insertions(+), 11 deletions(-)

diff --git a/engines/e_capi.c b/engines/e_capi.c
index 5bf0fe9..66fed29 100644
--- a/engines/e_capi.c
+++ b/engines/e_capi.c
@@ -176,9 +176,11 @@ static int capi_rsa_priv_dec(int flen, const unsigned char *from,
                              unsigned char *to, RSA *rsa, int padding);
 static int capi_rsa_free(RSA *rsa);
 
+# ifndef OPENSSL_NO_DSA
 static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen,
                                  DSA *dsa);
 static int capi_dsa_free(DSA *dsa);
+# endif
 
 static int capi_load_ssl_client_cert(ENGINE *e, SSL *ssl,
                                      STACK_OF(X509_NAME) *ca_dn, X509 **pcert,
@@ -432,7 +434,9 @@ static int capi_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void))
 }
 
 static RSA_METHOD *capi_rsa_method = NULL;
+# ifndef OPENSSL_NO_DSA
 static DSA_METHOD *capi_dsa_method = NULL;
+# endif
 
 static int use_aes_csp = 0;
 
@@ -440,7 +444,9 @@ static int capi_init(ENGINE *e)
 {
     CAPI_CTX *ctx;
     const RSA_METHOD *ossl_rsa_meth;
+# ifndef OPENSSL_NO_DSA
     const DSA_METHOD *ossl_dsa_meth;
+# endif
     HCRYPTPROV hprov;
 
     if (capi_idx < 0) {
@@ -468,6 +474,7 @@ static int capi_init(ENGINE *e)
             goto memerr;
         }
 
+# ifndef OPENSSL_NO_DSA
         /* Setup DSA Method */
         dsa_capi_idx = DSA_get_ex_new_index(0, NULL, NULL, NULL, 0);
         ossl_dsa_meth = DSA_OpenSSL();
@@ -481,6 +488,7 @@ static int capi_init(ENGINE *e)
                                     DSA_meth_get_bn_mod_exp(ossl_dsa_meth))) {
             goto memerr;
         }
+# endif
     }
 
     ctx = capi_ctx_new();
@@ -526,8 +534,10 @@ static int capi_destroy(ENGINE *e)
 {
     RSA_meth_free(capi_rsa_method);
     capi_rsa_method = NULL;
+# ifndef OPENSSL_NO_DSA
     DSA_meth_free(capi_dsa_method);
     capi_dsa_method = NULL;
+# endif
     ERR_unload_CAPI_strings();
     return 1;
 }
@@ -560,9 +570,11 @@ static int bind_capi(ENGINE *e)
     capi_rsa_method = RSA_meth_new("CryptoAPI RSA method", 0);
     if (capi_rsa_method == NULL)
         return 0;
+# ifndef OPENSSL_NO_DSA
     capi_dsa_method = DSA_meth_new("CryptoAPI DSA method", 0);
     if (capi_dsa_method == NULL)
         goto memerr;
+# endif
     if (!ENGINE_set_id(e, engine_capi_id)
         || !ENGINE_set_name(e, engine_capi_name)
         || !ENGINE_set_flags(e, ENGINE_FLAGS_NO_REGISTER_ALL)
@@ -570,7 +582,9 @@ static int bind_capi(ENGINE *e)
         || !ENGINE_set_finish_function(e, capi_finish)
         || !ENGINE_set_destroy_function(e, capi_destroy)
         || !ENGINE_set_RSA(e, capi_rsa_method)
+# ifndef OPENSSL_NO_DSA
         || !ENGINE_set_DSA(e, capi_dsa_method)
+# endif
         || !ENGINE_set_load_privkey_function(e, capi_load_privkey)
         || !ENGINE_set_load_ssl_client_cert_function(e,
                                                      capi_load_ssl_client_cert)
@@ -583,8 +597,10 @@ static int bind_capi(ENGINE *e)
  memerr:
     RSA_meth_free(capi_rsa_method);
     capi_rsa_method = NULL;
+# ifndef OPENSSL_NO_DSA
     DSA_meth_free(capi_dsa_method);
     capi_dsa_method = NULL;
+# endif
     return 0;
 }
 
@@ -722,6 +738,7 @@ static EVP_PKEY *capi_get_pkey(ENGINE *eng, CAPI_KEY * key)
         EVP_PKEY_assign_RSA(ret, rkey);
         rkey = NULL;
 
+# ifndef OPENSSL_NO_DSA
     } else if (bh->aiKeyAlg == CALG_DSS_SIGN) {
         DSSPUBKEY *dp;
         DWORD dsa_plen;
@@ -774,6 +791,7 @@ static EVP_PKEY *capi_get_pkey(ENGINE *eng, CAPI_KEY * key)
 
         EVP_PKEY_assign_DSA(ret, dkey);
         dkey = NULL;
+# endif
     } else {
         char algstr[10];
         BIO_snprintf(algstr, 10, "%ux", bh->aiKeyAlg);
@@ -787,7 +805,9 @@ static EVP_PKEY *capi_get_pkey(ENGINE *eng, CAPI_KEY * key)
     OPENSSL_free(pubkey);
     if (!ret) {
         RSA_free(rkey);
+# ifndef OPENSSL_NO_DSA
         DSA_free(dkey);
+# endif
     }
 
     return ret;
@@ -990,6 +1010,7 @@ static int capi_rsa_free(RSA *rsa)
     return 1;
 }
 
+# ifndef OPENSSL_NO_DSA
 /* CryptoAPI DSA operations */
 
 static DSA_SIG *capi_dsa_do_sign(const unsigned char *digest, int dlen,
@@ -1068,6 +1089,7 @@ static int capi_dsa_free(DSA *dsa)
     DSA_set_ex_data(dsa, dsa_capi_idx, 0);
     return 1;
 }
+# endif
 
 static void capi_vtrace(CAPI_CTX * ctx, int level, char *format,
                         va_list argptr)
diff --git a/include/openssl/pem.h b/include/openssl/pem.h
index 0206fec..1ec33d3 100644
--- a/include/openssl/pem.h
+++ b/include/openssl/pem.h
@@ -421,7 +421,7 @@ int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
                                   void *u);
 
-#ifndef OPENSSL_NO_STDIO
+# ifndef OPENSSL_NO_STDIO
 int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
                            char *kstr, int klen,
                            pem_password_cb *cb, void *u);
@@ -438,20 +438,22 @@ EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
 int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
                               char *kstr, int klen, pem_password_cb *cd,
                               void *u);
-#endif
+# endif
 EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
 int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);
 
+# ifndef OPENSSL_NO_DSA
 EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
 EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
 EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
 EVP_PKEY *b2i_PublicKey_bio(BIO *in);
 int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk);
 int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk);
-# ifndef OPENSSL_NO_RC4
+#  ifndef OPENSSL_NO_RC4
 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
 int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
                 pem_password_cb *cb, void *u);
+#  endif
 # endif
 
 /* BEGIN ERROR CODES */
diff --git a/util/libcrypto.num b/util/libcrypto.num
index 6d73f14..efa5063 100644
--- a/util/libcrypto.num
+++ b/util/libcrypto.num
@@ -1,5 +1,5 @@
 d2i_EC_PUBKEY                           1	1_1_0	EXIST::FUNCTION:EC
-b2i_PVK_bio                             2	1_1_0	EXIST::FUNCTION:RC4
+b2i_PVK_bio                             2	1_1_0	EXIST::FUNCTION:DSA,RC4
 PEM_read_bio_NETSCAPE_CERT_SEQUENCE     3	1_1_0	EXIST::FUNCTION:
 X509_STORE_CTX_get0_chain               4	1_1_0	EXIST::FUNCTION:
 COMP_expand_block                       5	1_1_0	EXIST::FUNCTION:COMP
@@ -216,7 +216,7 @@ RSA_X931_hash_id                        212	1_1_0	EXIST::FUNCTION:RSA
 EC_KEY_set_method                       213	1_1_0	EXIST::FUNCTION:EC
 PEM_write_PKCS8_PRIV_KEY_INFO           214	1_1_0	EXIST::FUNCTION:
 X509at_get0_data_by_OBJ                 215	1_1_0	EXIST::FUNCTION:
-b2i_PublicKey_bio                       216	1_1_0	EXIST::FUNCTION:
+b2i_PublicKey_bio                       216	1_1_0	EXIST::FUNCTION:DSA
 s2i_ASN1_OCTET_STRING                   217	1_1_0	EXIST::FUNCTION:
 POLICYINFO_it                           218	1_1_0	EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
 POLICYINFO_it                           218	1_1_0	EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
@@ -236,7 +236,7 @@ DIST_POINT_NAME_new                     231	1_1_0	EXIST::FUNCTION:
 X509_LOOKUP_file                        232	1_1_0	EXIST::FUNCTION:
 EVP_PKEY_meth_set_decrypt               233	1_1_0	EXIST::FUNCTION:
 EVP_rc2_ecb                             234	1_1_0	EXIST::FUNCTION:RC2
-i2b_PublicKey_bio                       235	1_1_0	EXIST::FUNCTION:
+i2b_PublicKey_bio                       235	1_1_0	EXIST::FUNCTION:DSA
 d2i_ASN1_SET_ANY                        236	1_1_0	EXIST::FUNCTION:
 ASN1_item_i2d                           238	1_1_0	EXIST::FUNCTION:
 OCSP_copy_nonce                         239	1_1_0	EXIST::FUNCTION:OCSP
@@ -1359,7 +1359,7 @@ RAND_event                              1318	1_1_0	EXIST:WIN32:FUNCTION:
 i2d_PKCS12_fp                           1319	1_1_0	EXIST::FUNCTION:
 EVP_PKEY_meth_get_init                  1320	1_1_0	EXIST::FUNCTION:
 X509_check_trust                        1321	1_1_0	EXIST::FUNCTION:
-b2i_PrivateKey                          1322	1_1_0	EXIST::FUNCTION:
+b2i_PrivateKey                          1322	1_1_0	EXIST::FUNCTION:DSA
 HMAC_Init_ex                            1323	1_1_0	EXIST::FUNCTION:
 SMIME_read_CMS                          1324	1_1_0	EXIST::FUNCTION:CMS
 X509_subject_name_cmp                   1325	1_1_0	EXIST::FUNCTION:
@@ -1747,7 +1747,7 @@ PKCS12_SAFEBAG_get_bag_nid              1696	1_1_0	EXIST::FUNCTION:
 TS_CONF_set_digests                     1697	1_1_0	EXIST::FUNCTION:TS
 PKCS7_SIGNED_it                         1698	1_1_0	EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
 PKCS7_SIGNED_it                         1698	1_1_0	EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
-b2i_PublicKey                           1699	1_1_0	EXIST::FUNCTION:
+b2i_PublicKey                           1699	1_1_0	EXIST::FUNCTION:DSA
 X509_PURPOSE_cleanup                    1700	1_1_0	EXIST::FUNCTION:
 ESS_SIGNING_CERT_dup                    1701	1_1_0	EXIST::FUNCTION:TS
 ENGINE_set_default_DSA                  1702	1_1_0	EXIST::FUNCTION:ENGINE
@@ -1912,7 +1912,7 @@ UI_method_set_reader                    1854	1_1_0	EXIST::FUNCTION:UI
 BIO_next                                1855	1_1_0	EXIST::FUNCTION:
 ASN1_STRING_set_default_mask_asc        1856	1_1_0	EXIST::FUNCTION:
 X509_CRL_new                            1857	1_1_0	EXIST::FUNCTION:
-i2b_PrivateKey_bio                      1858	1_1_0	EXIST::FUNCTION:
+i2b_PrivateKey_bio                      1858	1_1_0	EXIST::FUNCTION:DSA
 ASN1_STRING_length_set                  1859	1_1_0	EXIST::FUNCTION:
 PEM_write_PKCS8                         1860	1_1_0	EXIST::FUNCTION:
 PKCS7_digest_from_attributes            1861	1_1_0	EXIST::FUNCTION:
@@ -2907,7 +2907,7 @@ ENGINE_register_all_DH                  2809	1_1_0	EXIST::FUNCTION:ENGINE
 ERR_clear_error                         2810	1_1_0	EXIST::FUNCTION:
 EC_KEY_dup                              2811	1_1_0	EXIST::FUNCTION:EC
 X509_LOOKUP_init                        2812	1_1_0	EXIST::FUNCTION:
-i2b_PVK_bio                             2813	1_1_0	EXIST::FUNCTION:RC4
+i2b_PVK_bio                             2813	1_1_0	EXIST::FUNCTION:DSA,RC4
 OCSP_ONEREQ_free                        2814	1_1_0	EXIST::FUNCTION:OCSP
 X509V3_EXT_print_fp                     2815	1_1_0	EXIST::FUNCTION:STDIO
 OBJ_bsearch_ex_                         2816	1_1_0	EXIST::FUNCTION:
@@ -3286,7 +3286,7 @@ CRYPTO_get_dynlock_create_callback      3177	1_1_0	NOEXIST::FUNCTION:
 i2a_ACCESS_DESCRIPTION                  3178	1_1_0	EXIST::FUNCTION:
 EC_KEY_set_enc_flags                    3179	1_1_0	EXIST::FUNCTION:EC
 i2d_PUBKEY_fp                           3180	1_1_0	EXIST::FUNCTION:STDIO
-b2i_PrivateKey_bio                      3181	1_1_0	EXIST::FUNCTION:
+b2i_PrivateKey_bio                      3181	1_1_0	EXIST::FUNCTION:DSA
 OCSP_REQUEST_add_ext                    3182	1_1_0	EXIST::FUNCTION:OCSP
 SXNET_add_id_INTEGER                    3183	1_1_0	EXIST::FUNCTION:
 CTLOG_get0_public_key                   3184	1_1_0	EXIST::FUNCTION:CT


More information about the openssl-commits mailing list