summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-04-15 18:44:17 +0000
committertb <>2023-04-15 18:44:17 +0000
commitdd4d11ff3980719420626572b001eadad7632ea5 (patch)
tree5509caf21f38c04a103103acc1091fd4f6b884de
parent33ffd98a48be03b84c6c382e055bb6e8a007a930 (diff)
downloadopenbsd-dd4d11ff3980719420626572b001eadad7632ea5.tar.gz
openbsd-dd4d11ff3980719420626572b001eadad7632ea5.tar.bz2
openbsd-dd4d11ff3980719420626572b001eadad7632ea5.zip
Prepare rsa.h for X9.31 support removal
This wraps the three public functions in the usual #if stanza. RSA_X931_PADDING is unfortunately exposed by rust-openssl and erlang. Therefore it will remain visible to avoid breaking the build of lang/rust. Its use in the library will be neutered shortly. ok jsing
-rw-r--r--src/lib/libcrypto/rsa/rsa.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h
index fa98f9cf76..3ee2afd627 100644
--- a/src/lib/libcrypto/rsa/rsa.h
+++ b/src/lib/libcrypto/rsa/rsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa.h,v 1.59 2023/04/09 19:10:23 tb Exp $ */ 1/* $OpenBSD: rsa.h,v 1.60 2023/04/15 18:44:17 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 *
@@ -226,6 +226,7 @@ typedef struct rsa_oaep_params_st {
226#define RSA_SSLV23_PADDING 2 226#define RSA_SSLV23_PADDING 2
227#define RSA_NO_PADDING 3 227#define RSA_NO_PADDING 3
228#define RSA_PKCS1_OAEP_PADDING 4 228#define RSA_PKCS1_OAEP_PADDING 4
229/* Leave this for now as rust-openssl and erlang expose it. */
229#define RSA_X931_PADDING 5 230#define RSA_X931_PADDING 5
230/* EVP_PKEY_ only */ 231/* EVP_PKEY_ only */
231#define RSA_PKCS1_PSS_PADDING 6 232#define RSA_PKCS1_PSS_PADDING 6
@@ -349,11 +350,14 @@ int RSA_padding_add_none(unsigned char *to, int tlen,
349 const unsigned char *f, int fl); 350 const unsigned char *f, int fl);
350int RSA_padding_check_none(unsigned char *to, int tlen, 351int RSA_padding_check_none(unsigned char *to, int tlen,
351 const unsigned char *f, int fl, int rsa_len); 352 const unsigned char *f, int fl, int rsa_len);
353/* Remove in next major bump. */
354#if !defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
352int RSA_padding_add_X931(unsigned char *to, int tlen, 355int RSA_padding_add_X931(unsigned char *to, int tlen,
353 const unsigned char *f, int fl); 356 const unsigned char *f, int fl);
354int RSA_padding_check_X931(unsigned char *to, int tlen, 357int RSA_padding_check_X931(unsigned char *to, int tlen,
355 const unsigned char *f, int fl, int rsa_len); 358 const unsigned char *f, int fl, int rsa_len);
356int RSA_X931_hash_id(int nid); 359int RSA_X931_hash_id(int nid);
360#endif
357 361
358int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, 362int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
359 const EVP_MD *Hash, const unsigned char *EM, int sLen); 363 const EVP_MD *Hash, const unsigned char *EM, int sLen);