diff options
author | tb <> | 2024-03-02 10:08:29 +0000 |
---|---|---|
committer | tb <> | 2024-03-02 10:08:29 +0000 |
commit | bb2222e671a46a72a1bbbf44ad27a1183debd4a0 (patch) | |
tree | 5621076853590b3776629206e0ae7c26d34085ad /src | |
parent | bf1a25cf15e3f47d3834fd61008d8a969ffb84cb (diff) | |
download | openbsd-bb2222e671a46a72a1bbbf44ad27a1183debd4a0.tar.gz openbsd-bb2222e671a46a72a1bbbf44ad27a1183debd4a0.tar.bz2 openbsd-bb2222e671a46a72a1bbbf44ad27a1183debd4a0.zip |
Make legacy cipher methods internal
These are ASN.1 handlers for CIPHERs, still used by CMS and its
predecessors. They should never have been public.
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/evp_local.h | 8 |
3 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 28f115da06..3d8f456389 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1181,12 +1181,10 @@ EVP_CIPHER_CTX_set_iv | |||
1181 | EVP_CIPHER_CTX_set_key_length | 1181 | EVP_CIPHER_CTX_set_key_length |
1182 | EVP_CIPHER_CTX_set_padding | 1182 | EVP_CIPHER_CTX_set_padding |
1183 | EVP_CIPHER_CTX_test_flags | 1183 | EVP_CIPHER_CTX_test_flags |
1184 | EVP_CIPHER_asn1_to_param | ||
1185 | EVP_CIPHER_block_size | 1184 | EVP_CIPHER_block_size |
1186 | EVP_CIPHER_do_all | 1185 | EVP_CIPHER_do_all |
1187 | EVP_CIPHER_do_all_sorted | 1186 | EVP_CIPHER_do_all_sorted |
1188 | EVP_CIPHER_flags | 1187 | EVP_CIPHER_flags |
1189 | EVP_CIPHER_get_asn1_iv | ||
1190 | EVP_CIPHER_iv_length | 1188 | EVP_CIPHER_iv_length |
1191 | EVP_CIPHER_key_length | 1189 | EVP_CIPHER_key_length |
1192 | EVP_CIPHER_meth_dup | 1190 | EVP_CIPHER_meth_dup |
@@ -1202,8 +1200,6 @@ EVP_CIPHER_meth_set_init | |||
1202 | EVP_CIPHER_meth_set_iv_length | 1200 | EVP_CIPHER_meth_set_iv_length |
1203 | EVP_CIPHER_meth_set_set_asn1_params | 1201 | EVP_CIPHER_meth_set_set_asn1_params |
1204 | EVP_CIPHER_nid | 1202 | EVP_CIPHER_nid |
1205 | EVP_CIPHER_param_to_asn1 | ||
1206 | EVP_CIPHER_set_asn1_iv | ||
1207 | EVP_CIPHER_type | 1203 | EVP_CIPHER_type |
1208 | EVP_Cipher | 1204 | EVP_Cipher |
1209 | EVP_CipherFinal | 1205 | EVP_CipherFinal |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index b810e72767..f7026e2cea 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp.h,v 1.128 2024/03/02 10:06:48 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.129 2024/03/02 10:08:29 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -876,14 +876,6 @@ int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); | |||
876 | 876 | ||
877 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); | 877 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); |
878 | 878 | ||
879 | /* calls methods */ | ||
880 | int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
881 | int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
882 | |||
883 | /* These are used by EVP_CIPHER methods */ | ||
884 | int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
885 | int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); | ||
886 | |||
887 | /* PKCS5 password based encryption */ | 879 | /* PKCS5 password based encryption */ |
888 | int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | 880 | int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, |
889 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); | 881 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); |
diff --git a/src/lib/libcrypto/evp/evp_local.h b/src/lib/libcrypto/evp/evp_local.h index 0e6b6bdfa2..bce6a87a1e 100644 --- a/src/lib/libcrypto/evp/evp_local.h +++ b/src/lib/libcrypto/evp/evp_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: evp_local.h,v 1.17 2024/03/02 10:06:48 tb Exp $ */ | 1 | /* $OpenBSD: evp_local.h,v 1.18 2024/03/02 10:08:29 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -373,6 +373,12 @@ struct evp_aead_ctx_st { | |||
373 | void *aead_state; | 373 | void *aead_state; |
374 | }; | 374 | }; |
375 | 375 | ||
376 | /* Legacy EVP_CIPHER methods used by CMS and its predecessors. */ | ||
377 | int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); | ||
378 | int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); | ||
379 | int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); | ||
380 | int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); | ||
381 | |||
376 | int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | 382 | int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, |
377 | ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); | 383 | ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); |
378 | 384 | ||