summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp')
-rw-r--r--src/lib/libcrypto/evp/evp.h7
-rw-r--r--src/lib/libcrypto/evp/evp_local.h5
-rw-r--r--src/lib/libcrypto/evp/evp_pbe.c8
3 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 28b095ffd4..9e203b086d 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.130 2024/03/02 10:13:13 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.131 2024/03/02 10:20:27 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 *
@@ -870,17 +870,12 @@ int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid);
870int EVP_CIPHER_type(const EVP_CIPHER *ctx); 870int EVP_CIPHER_type(const EVP_CIPHER *ctx);
871 871
872/* PKCS5 password based encryption */ 872/* PKCS5 password based encryption */
873int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
874 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de);
875int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, 873int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
876 const unsigned char *salt, int saltlen, int iter, int keylen, 874 const unsigned char *salt, int saltlen, int iter, int keylen,
877 unsigned char *out); 875 unsigned char *out);
878int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, 876int PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt,
879 int saltlen, int iter, const EVP_MD *digest, int keylen, 877 int saltlen, int iter, const EVP_MD *digest, int keylen,
880 unsigned char *out); 878 unsigned char *out);
881int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
882 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md,
883 int en_de);
884 879
885#define ASN1_PKEY_ALIAS 0x1 880#define ASN1_PKEY_ALIAS 0x1
886#define ASN1_PKEY_DYNAMIC 0x2 881#define ASN1_PKEY_DYNAMIC 0x2
diff --git a/src/lib/libcrypto/evp/evp_local.h b/src/lib/libcrypto/evp/evp_local.h
index bce6a87a1e..dad2cec81e 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.18 2024/03/02 10:08:29 tb Exp $ */ 1/* $OpenBSD: evp_local.h,v 1.19 2024/03/02 10:20:27 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 */
@@ -340,9 +340,6 @@ struct evp_pkey_method_st {
340 340
341void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx); 341void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx);
342 342
343int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
344 ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de);
345
346/* EVP_AEAD represents a specific AEAD algorithm. */ 343/* EVP_AEAD represents a specific AEAD algorithm. */
347struct evp_aead_st { 344struct evp_aead_st {
348 unsigned char key_len; 345 unsigned char key_len;
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c
index a9f5b8fb12..532c924a9e 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.45 2024/03/02 10:17:37 tb Exp $ */ 1/* $OpenBSD: evp_pbe.c,v 1.46 2024/03/02 10:20:27 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 */
@@ -73,9 +73,15 @@
73#include "x509_local.h" 73#include "x509_local.h"
74 74
75/* Password based encryption (PBE) functions */ 75/* Password based encryption (PBE) functions */
76int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
77 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de);
78int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
79 ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de);
76int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, 80int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
77 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md_type, 81 ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md_type,
78 int en_de); 82 int en_de);
83int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
84 ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, int en_de);
79 85
80static const struct pbe_config { 86static const struct pbe_config {
81 int pbe_nid; 87 int pbe_nid;