diff options
author | Richard Levitte <levitte@openssl.org> | 2020-12-09 17:50:20 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-13 10:27:31 +0100 |
commit | 2e1bc081007db167d7ce4740fcc6f185f62c9881 (patch) | |
tree | b13840b220e92ae59d52c11b2d33982ff47db3b1 /providers | |
parent | a158f8cfb9588634831615128a9b9d4b92204cff (diff) |
Remove unnecessary guards around MSBLOB and PVK readers and writers
The OPENSSL_NO_RC4 guard remain around protected PVK tests in
test/endecoder_test.c.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13648)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/decoders.inc | 6 | ||||
-rw-r--r-- | providers/implementations/encode_decode/build.info | 5 | ||||
-rw-r--r-- | providers/implementations/encode_decode/decode_ms2key.c | 16 |
3 files changed, 1 insertions, 26 deletions
diff --git a/providers/decoders.inc b/providers/decoders.inc index a9119cad79..c9f0dea638 100644 --- a/providers/decoders.inc +++ b/providers/decoders.inc @@ -50,9 +50,7 @@ DECODER_w_structure("DSA", der, SubjectPublicKeyInfo, dsa, yes), DECODER_w_structure("DSA", der, type_specific, dsa, yes), DECODER_w_structure("DSA", der, DSA, dsa, yes), DECODER("DSA", msblob, dsa, yes), -# ifndef OPENSSL_NO_RC4 DECODER("DSA", pvk, dsa, yes), -# endif #endif #ifndef OPENSSL_NO_EC DECODER_w_structure("EC", der, PKCS8, ec, yes), @@ -74,11 +72,7 @@ DECODER_w_structure("RSA", der, type_specific_keypair, rsa, yes), DECODER_w_structure("RSA", der, RSA, rsa, yes), DECODER_w_structure("RSA-PSS", der, PKCS8, rsapss, yes), DECODER_w_structure("RSA-PSS", der, SubjectPublicKeyInfo, rsapss, yes), -#ifndef OPENSSL_NO_DSA DECODER("RSA", msblob, rsa, yes), -# ifndef OPENSSL_NO_RC4 DECODER("RSA", pvk, rsa, yes), -# endif -#endif DECODER("DER", pem, der, yes), diff --git a/providers/implementations/encode_decode/build.info b/providers/implementations/encode_decode/build.info index 97e2264418..0188589a61 100644 --- a/providers/implementations/encode_decode/build.info +++ b/providers/implementations/encode_decode/build.info @@ -12,10 +12,7 @@ $EC_GOAL=../../libimplementations.a SOURCE[$ENCODER_GOAL]=endecoder_common.c -SOURCE[$DECODER_GOAL]=decode_der2key.c decode_pem2der.c -IF[{- !$disabled{dsa} -}] - SOURCE[$DECODER_GOAL]=decode_ms2key.c -ENDIF +SOURCE[$DECODER_GOAL]=decode_der2key.c decode_pem2der.c decode_ms2key.c SOURCE[$DECODER_GOAL]=encode_key2any.c encode_key2text.c DEPEND[encode_key2any.o]=../../common/include/prov/der_rsa.h diff --git a/providers/implementations/encode_decode/decode_ms2key.c b/providers/implementations/encode_decode/decode_ms2key.c index 573f9c9a56..339b347fa0 100644 --- a/providers/implementations/encode_decode/decode_ms2key.c +++ b/providers/implementations/encode_decode/decode_ms2key.c @@ -28,7 +28,6 @@ #include "prov/implementations.h" #include "endecoder_local.h" -#ifndef OPENSSL_NO_DSA static EVP_PKEY *read_msblob(PROV_CTX *provctx, OSSL_CORE_BIO *cin, int *ispub) { BIO *in = bio_new_from_core_bio(provctx, cin); @@ -38,7 +37,6 @@ static EVP_PKEY *read_msblob(PROV_CTX *provctx, OSSL_CORE_BIO *cin, int *ispub) return pkey; } -# ifndef OPENSSL_NO_RC4 static EVP_PKEY *read_pvk(PROV_CTX *provctx, OSSL_CORE_BIO *cin, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg) { @@ -56,19 +54,13 @@ static EVP_PKEY *read_pvk(PROV_CTX *provctx, OSSL_CORE_BIO *cin, return pkey; } -# endif -#endif static OSSL_FUNC_decoder_freectx_fn ms2key_freectx; static OSSL_FUNC_decoder_gettable_params_fn ms2key_gettable_params; static OSSL_FUNC_decoder_get_params_fn msblob2key_get_params; -#ifndef OPENSSL_NO_RC4 static OSSL_FUNC_decoder_get_params_fn pvk2key_get_params; -#endif static OSSL_FUNC_decoder_decode_fn msblob2key_decode; -#ifndef OPENSSL_NO_RC4 static OSSL_FUNC_decoder_decode_fn pvk2key_decode; -#endif static OSSL_FUNC_decoder_export_object_fn ms2key_export_object; typedef void *(extract_key_fn)(EVP_PKEY *); @@ -134,7 +126,6 @@ static int msblob2key_get_params(OSSL_PARAM params[]) return 1; } -#ifndef OPENSSL_NO_RC4 static int pvk2key_get_params(OSSL_PARAM params[]) { OSSL_PARAM *p; @@ -145,7 +136,6 @@ static int pvk2key_get_params(OSSL_PARAM params[]) return 1; } -#endif static int ms2key_post(struct ms2key_ctx_st *ctx, EVP_PKEY *pkey, OSSL_CALLBACK *data_cb, void *data_cbarg) @@ -207,7 +197,6 @@ static int msblob2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, return ok; } -#ifndef OPENSSL_NO_RC4 static int pvk2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, OSSL_CALLBACK *data_cb, void *data_cbarg, OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg) @@ -223,7 +212,6 @@ static int pvk2key_decode(void *vctx, OSSL_CORE_BIO *cin, int selection, EVP_PKEY_free(pkey); return ok; } -#endif static int ms2key_export_object(void *vctx, const void *reference, size_t reference_sz, @@ -278,12 +266,8 @@ static int ms2key_export_object(void *vctx, #ifndef OPENSSL_NO_DSA IMPLEMENT_TYPE("DSA", DSA, dsa, EVP_PKEY_get1_DSA, DSA_free); IMPLEMENT_MS(msblob, dsa); -# ifndef OPENSSL_NO_RC4 IMPLEMENT_MS(pvk, dsa); -# endif #endif IMPLEMENT_TYPE("RSA", RSA, rsa, EVP_PKEY_get1_RSA, RSA_free); IMPLEMENT_MS(msblob, rsa); -#ifndef OPENSSL_NO_RC4 IMPLEMENT_MS(pvk, rsa); -#endif |