diff options
author | tb <> | 2025-03-09 15:45:52 +0000 |
---|---|---|
committer | tb <> | 2025-03-09 15:45:52 +0000 |
commit | f8097ca488d38b254a6328b17b9e7d7ae0a4af91 (patch) | |
tree | 5314c6fe04da2cddc626c86b7968e512280ef0a2 /src/lib | |
parent | d6fd6c5b95d3120cc1ae676084a2311cce900c11 (diff) | |
download | openbsd-f8097ca488d38b254a6328b17b9e7d7ae0a4af91.tar.gz openbsd-f8097ca488d38b254a6328b17b9e7d7ae0a4af91.tar.bz2 openbsd-f8097ca488d38b254a6328b17b9e7d7ae0a4af91.zip |
Reinstate PKCS12_key_gen_uni()
Unfortunately, this is used in acsm-calibre-plugin, via oscrypto.
Fixes https://github.com/Leseratte10/acsm-calibre-plugin/issues/112
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/hidden/openssl/pkcs12.h | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_key.c | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/pkcs12/pkcs12.h | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/pkcs12/pkcs12_local.h | 5 |
5 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 7e681aa38f..e259430bbf 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -1788,6 +1788,7 @@ PKCS12_free | |||
1788 | PKCS12_get0_mac | 1788 | PKCS12_get0_mac |
1789 | PKCS12_get_friendlyname | 1789 | PKCS12_get_friendlyname |
1790 | PKCS12_it | 1790 | PKCS12_it |
1791 | PKCS12_key_gen_uni | ||
1791 | PKCS12_mac_present | 1792 | PKCS12_mac_present |
1792 | PKCS12_new | 1793 | PKCS12_new |
1793 | PKCS12_newpass | 1794 | PKCS12_newpass |
diff --git a/src/lib/libcrypto/hidden/openssl/pkcs12.h b/src/lib/libcrypto/hidden/openssl/pkcs12.h index 0144ba4e35..7e5607ab77 100644 --- a/src/lib/libcrypto/hidden/openssl/pkcs12.h +++ b/src/lib/libcrypto/hidden/openssl/pkcs12.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs12.h,v 1.4 2024/07/09 06:13:22 beck Exp $ */ | 1 | /* $OpenBSD: pkcs12.h,v 1.5 2025/03/09 15:45:52 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2022 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -46,6 +46,7 @@ LCRYPTO_USED(PKCS12_unpack_p7encdata); | |||
46 | LCRYPTO_USED(PKCS12_unpack_authsafes); | 46 | LCRYPTO_USED(PKCS12_unpack_authsafes); |
47 | LCRYPTO_USED(PKCS8_add_keyusage); | 47 | LCRYPTO_USED(PKCS8_add_keyusage); |
48 | LCRYPTO_USED(PKCS12_get_friendlyname); | 48 | LCRYPTO_USED(PKCS12_get_friendlyname); |
49 | LCRYPTO_USED(PKCS12_key_gen_uni); | ||
49 | LCRYPTO_USED(PKCS12_verify_mac); | 50 | LCRYPTO_USED(PKCS12_verify_mac); |
50 | LCRYPTO_USED(PKCS12_set_mac); | 51 | LCRYPTO_USED(PKCS12_set_mac); |
51 | LCRYPTO_USED(OPENSSL_asc2uni); | 52 | LCRYPTO_USED(OPENSSL_asc2uni); |
diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c index 78e7d0450e..443d632c87 100644 --- a/src/lib/libcrypto/pkcs12/p12_key.c +++ b/src/lib/libcrypto/pkcs12/p12_key.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_key.c,v 1.35 2024/03/02 10:15:16 tb Exp $ */ | 1 | /* $OpenBSD: p12_key.c,v 1.36 2025/03/09 15:45:52 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -194,3 +194,4 @@ PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | |||
194 | 194 | ||
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | LCRYPTO_ALIAS(PKCS12_key_gen_uni); | ||
diff --git a/src/lib/libcrypto/pkcs12/pkcs12.h b/src/lib/libcrypto/pkcs12/pkcs12.h index 962403976d..200712039b 100644 --- a/src/lib/libcrypto/pkcs12/pkcs12.h +++ b/src/lib/libcrypto/pkcs12/pkcs12.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs12.h,v 1.28 2024/03/02 10:15:16 tb Exp $ */ | 1 | /* $OpenBSD: pkcs12.h,v 1.29 2025/03/09 15:45:52 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -182,6 +182,9 @@ STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12); | |||
182 | 182 | ||
183 | int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); | 183 | int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage); |
184 | char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); | 184 | char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag); |
185 | int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | ||
186 | int saltlen, int id, int iter, int n, unsigned char *out, | ||
187 | const EVP_MD *md_type); | ||
185 | int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); | 188 | int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen); |
186 | int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, | 189 | int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, |
187 | unsigned char *salt, int saltlen, int iter, | 190 | unsigned char *salt, int saltlen, int iter, |
diff --git a/src/lib/libcrypto/pkcs12/pkcs12_local.h b/src/lib/libcrypto/pkcs12/pkcs12_local.h index dfdcdce1f9..4a3ce4b3f0 100644 --- a/src/lib/libcrypto/pkcs12/pkcs12_local.h +++ b/src/lib/libcrypto/pkcs12/pkcs12_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pkcs12_local.h,v 1.5 2024/03/02 10:15:16 tb Exp $ */ | 1 | /* $OpenBSD: pkcs12_local.h,v 1.6 2025/03/09 15:45:52 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 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -153,9 +153,6 @@ PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it, | |||
153 | int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, | 153 | int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt, |
154 | int saltlen, int id, int iter, int n, unsigned char *out, | 154 | int saltlen, int id, int iter, int n, unsigned char *out, |
155 | const EVP_MD *md_type); | 155 | const EVP_MD *md_type); |
156 | int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt, | ||
157 | int saltlen, int id, int iter, int n, unsigned char *out, | ||
158 | const EVP_MD *md_type); | ||
159 | 156 | ||
160 | int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); | 157 | int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes); |
161 | PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); | 158 | PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk); |