diff options
| author | tb <> | 2024-03-02 10:17:37 +0000 |
|---|---|---|
| committer | tb <> | 2024-03-02 10:17:37 +0000 |
| commit | fdfad9e1701882b4e72b41155a9c8e4ef338ddbf (patch) | |
| tree | 4111116bc9b99272485abcc1794b98f58991ba5f /src | |
| parent | b88286b09abf67a2644f5e950fb27492f55b3b3e (diff) | |
| download | openbsd-fdfad9e1701882b4e72b41155a9c8e4ef338ddbf.tar.gz openbsd-fdfad9e1701882b4e72b41155a9c8e4ef338ddbf.tar.bz2 openbsd-fdfad9e1701882b4e72b41155a9c8e4ef338ddbf.zip | |
Remove most PBEPARAM stuff from public visibility
The struct itself needs to remain public, unfortunately.
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/Symbols.list | 14 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/p5_pbe.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/p5_pbev2.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_pbe.c | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509.h | 33 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_local.h | 33 |
6 files changed, 40 insertions, 50 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 88c618de26..7a27d6d1a3 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
| @@ -1810,15 +1810,7 @@ OpenSSL_add_all_ciphers | |||
| 1810 | OpenSSL_add_all_digests | 1810 | OpenSSL_add_all_digests |
| 1811 | OpenSSL_version | 1811 | OpenSSL_version |
| 1812 | OpenSSL_version_num | 1812 | OpenSSL_version_num |
| 1813 | PBE2PARAM_free | ||
| 1814 | PBE2PARAM_it | ||
| 1815 | PBE2PARAM_new | ||
| 1816 | PBEPARAM_free | ||
| 1817 | PBEPARAM_it | 1813 | PBEPARAM_it |
| 1818 | PBEPARAM_new | ||
| 1819 | PBKDF2PARAM_free | ||
| 1820 | PBKDF2PARAM_it | ||
| 1821 | PBKDF2PARAM_new | ||
| 1822 | PEM_ASN1_read | 1814 | PEM_ASN1_read |
| 1823 | PEM_ASN1_read_bio | 1815 | PEM_ASN1_read_bio |
| 1824 | PEM_ASN1_write | 1816 | PEM_ASN1_write |
| @@ -3182,9 +3174,6 @@ d2i_OCSP_SERVICELOC | |||
| 3182 | d2i_OCSP_SIGNATURE | 3174 | d2i_OCSP_SIGNATURE |
| 3183 | d2i_OCSP_SINGLERESP | 3175 | d2i_OCSP_SINGLERESP |
| 3184 | d2i_OTHERNAME | 3176 | d2i_OTHERNAME |
| 3185 | d2i_PBE2PARAM | ||
| 3186 | d2i_PBEPARAM | ||
| 3187 | d2i_PBKDF2PARAM | ||
| 3188 | d2i_PKCS12 | 3177 | d2i_PKCS12 |
| 3189 | d2i_PKCS12_SAFEBAG | 3178 | d2i_PKCS12_SAFEBAG |
| 3190 | d2i_PKCS12_bio | 3179 | d2i_PKCS12_bio |
| @@ -3377,9 +3366,6 @@ i2d_OCSP_SERVICELOC | |||
| 3377 | i2d_OCSP_SIGNATURE | 3366 | i2d_OCSP_SIGNATURE |
| 3378 | i2d_OCSP_SINGLERESP | 3367 | i2d_OCSP_SINGLERESP |
| 3379 | i2d_OTHERNAME | 3368 | i2d_OTHERNAME |
| 3380 | i2d_PBE2PARAM | ||
| 3381 | i2d_PBEPARAM | ||
| 3382 | i2d_PBKDF2PARAM | ||
| 3383 | i2d_PKCS12 | 3369 | i2d_PKCS12 |
| 3384 | i2d_PKCS12_SAFEBAG | 3370 | i2d_PKCS12_SAFEBAG |
| 3385 | i2d_PKCS12_bio | 3371 | i2d_PKCS12_bio |
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c index 204e818286..0b628b36d9 100644 --- a/src/lib/libcrypto/asn1/p5_pbe.c +++ b/src/lib/libcrypto/asn1/p5_pbe.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_pbe.c,v 1.25 2023/07/07 19:37:52 beck Exp $ */ | 1 | /* $OpenBSD: p5_pbe.c,v 1.26 2024/03/02 10:17:37 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 | */ |
| @@ -64,6 +64,8 @@ | |||
| 64 | #include <openssl/err.h> | 64 | #include <openssl/err.h> |
| 65 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 66 | 66 | ||
| 67 | #include "x509_local.h" | ||
| 68 | |||
| 67 | /* PKCS#5 password based encryption structure */ | 69 | /* PKCS#5 password based encryption structure */ |
| 68 | 70 | ||
| 69 | static const ASN1_TEMPLATE PBEPARAM_seq_tt[] = { | 71 | static const ASN1_TEMPLATE PBEPARAM_seq_tt[] = { |
diff --git a/src/lib/libcrypto/asn1/p5_pbev2.c b/src/lib/libcrypto/asn1/p5_pbev2.c index 8ee752c020..ebb20c296f 100644 --- a/src/lib/libcrypto/asn1/p5_pbev2.c +++ b/src/lib/libcrypto/asn1/p5_pbev2.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p5_pbev2.c,v 1.31 2024/02/18 15:44:10 tb Exp $ */ | 1 | /* $OpenBSD: p5_pbev2.c,v 1.32 2024/03/02 10:17:37 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-2004. | 3 | * project 1999-2004. |
| 4 | */ | 4 | */ |
| @@ -65,6 +65,7 @@ | |||
| 65 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 66 | 66 | ||
| 67 | #include "evp_local.h" | 67 | #include "evp_local.h" |
| 68 | #include "x509_local.h" | ||
| 68 | 69 | ||
| 69 | /* PKCS#5 v2.0 password based encryption structures */ | 70 | /* PKCS#5 v2.0 password based encryption structures */ |
| 70 | 71 | ||
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index 3f1f1ec9a4..a9f5b8fb12 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp_pbe.c,v 1.44 2024/03/02 10:15:15 tb Exp $ */ | 1 | /* $OpenBSD: evp_pbe.c,v 1.45 2024/03/02 10:17:37 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 | */ |
| @@ -70,6 +70,7 @@ | |||
| 70 | #include "evp_local.h" | 70 | #include "evp_local.h" |
| 71 | #include "hmac_local.h" | 71 | #include "hmac_local.h" |
| 72 | #include "pkcs12_local.h" | 72 | #include "pkcs12_local.h" |
| 73 | #include "x509_local.h" | ||
| 73 | 74 | ||
| 74 | /* Password based encryption (PBE) functions */ | 75 | /* Password based encryption (PBE) functions */ |
| 75 | int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | 76 | int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index fe18202533..bd8497d9c4 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.h,v 1.103 2023/11/02 20:25:48 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.104 2024/03/02 10:17:37 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 | * |
| @@ -328,28 +328,11 @@ typedef struct Netscape_spki_st { | |||
| 328 | ASN1_BIT_STRING *signature; | 328 | ASN1_BIT_STRING *signature; |
| 329 | } NETSCAPE_SPKI; | 329 | } NETSCAPE_SPKI; |
| 330 | 330 | ||
| 331 | /* Password based encryption structure */ | ||
| 332 | |||
| 333 | typedef struct PBEPARAM_st { | 331 | typedef struct PBEPARAM_st { |
| 334 | ASN1_OCTET_STRING *salt; | 332 | ASN1_OCTET_STRING *salt; |
| 335 | ASN1_INTEGER *iter; | 333 | ASN1_INTEGER *iter; |
| 336 | } PBEPARAM; | 334 | } PBEPARAM; |
| 337 | 335 | ||
| 338 | /* Password based encryption V2 structures */ | ||
| 339 | |||
| 340 | typedef struct PBE2PARAM_st { | ||
| 341 | X509_ALGOR *keyfunc; | ||
| 342 | X509_ALGOR *encryption; | ||
| 343 | } PBE2PARAM; | ||
| 344 | |||
| 345 | typedef struct PBKDF2PARAM_st { | ||
| 346 | /* Usually OCTET STRING but could be anything */ | ||
| 347 | ASN1_TYPE *salt; | ||
| 348 | ASN1_INTEGER *iter; | ||
| 349 | ASN1_INTEGER *keylength; | ||
| 350 | X509_ALGOR *prf; | ||
| 351 | } PBKDF2PARAM; | ||
| 352 | |||
| 353 | #ifdef __cplusplus | 336 | #ifdef __cplusplus |
| 354 | } | 337 | } |
| 355 | #endif | 338 | #endif |
| @@ -1033,21 +1016,7 @@ X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk,X509_NAME *name, | |||
| 1033 | ASN1_INTEGER *serial); | 1016 | ASN1_INTEGER *serial); |
| 1034 | X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); | 1017 | X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); |
| 1035 | 1018 | ||
| 1036 | PBEPARAM *PBEPARAM_new(void); | ||
| 1037 | void PBEPARAM_free(PBEPARAM *a); | ||
| 1038 | PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); | ||
| 1039 | int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out); | ||
| 1040 | extern const ASN1_ITEM PBEPARAM_it; | 1019 | extern const ASN1_ITEM PBEPARAM_it; |
| 1041 | PBE2PARAM *PBE2PARAM_new(void); | ||
| 1042 | void PBE2PARAM_free(PBE2PARAM *a); | ||
| 1043 | PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); | ||
| 1044 | int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out); | ||
| 1045 | extern const ASN1_ITEM PBE2PARAM_it; | ||
| 1046 | PBKDF2PARAM *PBKDF2PARAM_new(void); | ||
| 1047 | void PBKDF2PARAM_free(PBKDF2PARAM *a); | ||
| 1048 | PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); | ||
| 1049 | int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out); | ||
| 1050 | extern const ASN1_ITEM PBKDF2PARAM_it; | ||
| 1051 | 1020 | ||
| 1052 | int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, | 1021 | int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, |
| 1053 | const unsigned char *salt, int saltlen); | 1022 | const unsigned char *salt, int saltlen); |
diff --git a/src/lib/libcrypto/x509/x509_local.h b/src/lib/libcrypto/x509/x509_local.h index f62f5ad57d..1e813797e1 100644 --- a/src/lib/libcrypto/x509/x509_local.h +++ b/src/lib/libcrypto/x509/x509_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_local.h,v 1.18 2024/01/06 17:37:23 tb Exp $ */ | 1 | /* $OpenBSD: x509_local.h,v 1.19 2024/03/02 10:17:37 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 2013. | 3 | * project 2013. |
| 4 | */ | 4 | */ |
| @@ -360,6 +360,37 @@ int X509_policy_check(const STACK_OF(X509) *certs, | |||
| 360 | const STACK_OF(ASN1_OBJECT) *user_policies, unsigned long flags, | 360 | const STACK_OF(ASN1_OBJECT) *user_policies, unsigned long flags, |
| 361 | X509 **out_current_cert); | 361 | X509 **out_current_cert); |
| 362 | 362 | ||
| 363 | PBEPARAM *PBEPARAM_new(void); | ||
| 364 | void PBEPARAM_free(PBEPARAM *a); | ||
| 365 | PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len); | ||
| 366 | int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out); | ||
| 367 | |||
| 368 | /* Password based encryption V2 structures */ | ||
| 369 | typedef struct PBE2PARAM_st { | ||
| 370 | X509_ALGOR *keyfunc; | ||
| 371 | X509_ALGOR *encryption; | ||
| 372 | } PBE2PARAM; | ||
| 373 | |||
| 374 | PBE2PARAM *PBE2PARAM_new(void); | ||
| 375 | void PBE2PARAM_free(PBE2PARAM *a); | ||
| 376 | PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len); | ||
| 377 | int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out); | ||
| 378 | extern const ASN1_ITEM PBE2PARAM_it; | ||
| 379 | |||
| 380 | typedef struct PBKDF2PARAM_st { | ||
| 381 | /* Usually OCTET STRING but could be anything */ | ||
| 382 | ASN1_TYPE *salt; | ||
| 383 | ASN1_INTEGER *iter; | ||
| 384 | ASN1_INTEGER *keylength; | ||
| 385 | X509_ALGOR *prf; | ||
| 386 | } PBKDF2PARAM; | ||
| 387 | |||
| 388 | PBKDF2PARAM *PBKDF2PARAM_new(void); | ||
| 389 | void PBKDF2PARAM_free(PBKDF2PARAM *a); | ||
| 390 | PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len); | ||
| 391 | int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out); | ||
| 392 | extern const ASN1_ITEM PBKDF2PARAM_it; | ||
| 393 | |||
| 363 | __END_HIDDEN_DECLS | 394 | __END_HIDDEN_DECLS |
| 364 | 395 | ||
| 365 | #endif /* !HEADER_X509_LOCAL_H */ | 396 | #endif /* !HEADER_X509_LOCAL_H */ |
