summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509
diff options
context:
space:
mode:
authortb <>2024-03-02 10:17:37 +0000
committertb <>2024-03-02 10:17:37 +0000
commitfdfad9e1701882b4e72b41155a9c8e4ef338ddbf (patch)
tree4111116bc9b99272485abcc1794b98f58991ba5f /src/lib/libcrypto/x509
parentb88286b09abf67a2644f5e950fb27492f55b3b3e (diff)
downloadopenbsd-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/lib/libcrypto/x509')
-rw-r--r--src/lib/libcrypto/x509/x509.h33
-rw-r--r--src/lib/libcrypto/x509/x509_local.h33
2 files changed, 33 insertions, 33 deletions
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
333typedef struct PBEPARAM_st { 331typedef 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
340typedef struct PBE2PARAM_st {
341 X509_ALGOR *keyfunc;
342 X509_ALGOR *encryption;
343} PBE2PARAM;
344
345typedef 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);
1034X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name); 1017X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name);
1035 1018
1036PBEPARAM *PBEPARAM_new(void);
1037void PBEPARAM_free(PBEPARAM *a);
1038PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len);
1039int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out);
1040extern const ASN1_ITEM PBEPARAM_it; 1019extern const ASN1_ITEM PBEPARAM_it;
1041PBE2PARAM *PBE2PARAM_new(void);
1042void PBE2PARAM_free(PBE2PARAM *a);
1043PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len);
1044int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out);
1045extern const ASN1_ITEM PBE2PARAM_it;
1046PBKDF2PARAM *PBKDF2PARAM_new(void);
1047void PBKDF2PARAM_free(PBKDF2PARAM *a);
1048PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len);
1049int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out);
1050extern const ASN1_ITEM PBKDF2PARAM_it;
1051 1020
1052int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter, 1021int 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
363PBEPARAM *PBEPARAM_new(void);
364void PBEPARAM_free(PBEPARAM *a);
365PBEPARAM *d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len);
366int i2d_PBEPARAM(PBEPARAM *a, unsigned char **out);
367
368/* Password based encryption V2 structures */
369typedef struct PBE2PARAM_st {
370 X509_ALGOR *keyfunc;
371 X509_ALGOR *encryption;
372} PBE2PARAM;
373
374PBE2PARAM *PBE2PARAM_new(void);
375void PBE2PARAM_free(PBE2PARAM *a);
376PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, const unsigned char **in, long len);
377int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **out);
378extern const ASN1_ITEM PBE2PARAM_it;
379
380typedef 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
388PBKDF2PARAM *PBKDF2PARAM_new(void);
389void PBKDF2PARAM_free(PBKDF2PARAM *a);
390PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, const unsigned char **in, long len);
391int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **out);
392extern 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 */