diff options
author | tb <> | 2024-01-01 15:43:02 +0000 |
---|---|---|
committer | tb <> | 2024-01-01 15:43:02 +0000 |
commit | d256ca944247bb2fd2ab63bcfda5a170f1b0d0ea (patch) | |
tree | d400e647658d42e9102535a0bf4a7d3e2117ffa5 /src | |
parent | 3b5c644fe6f635d6c796c6e8fed6b0529c9edd30 (diff) | |
download | openbsd-d256ca944247bb2fd2ab63bcfda5a170f1b0d0ea.tar.gz openbsd-d256ca944247bb2fd2ab63bcfda5a170f1b0d0ea.tar.bz2 openbsd-d256ca944247bb2fd2ab63bcfda5a170f1b0d0ea.zip |
pkey_is_pss() and pkey_ctx_is_pss() to rsa_ameth.c
These aren't particularly helpful and should probably both be expanded.
For now move them to the only place where they are actually used.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_local.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index a43bcf9f9a..2266f0cbd5 100644 --- a/src/lib/libcrypto/rsa/rsa_ameth.c +++ b/src/lib/libcrypto/rsa/rsa_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_ameth.c,v 1.53 2023/12/28 21:58:12 tb Exp $ */ | 1 | /* $OpenBSD: rsa_ameth.c,v 1.54 2024/01/01 15:43:02 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 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -74,6 +74,10 @@ | |||
74 | #include "rsa_local.h" | 74 | #include "rsa_local.h" |
75 | #include "x509_local.h" | 75 | #include "x509_local.h" |
76 | 76 | ||
77 | /* Macros to test if a pkey or ctx is for a PSS key */ | ||
78 | #define pkey_is_pss(pkey) (pkey->ameth->pkey_id == EVP_PKEY_RSA_PSS) | ||
79 | #define pkey_ctx_is_pss(ctx) (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) | ||
80 | |||
77 | #ifndef OPENSSL_NO_CMS | 81 | #ifndef OPENSSL_NO_CMS |
78 | static int rsa_cms_sign(CMS_SignerInfo *si); | 82 | static int rsa_cms_sign(CMS_SignerInfo *si); |
79 | static int rsa_cms_verify(CMS_SignerInfo *si); | 83 | static int rsa_cms_verify(CMS_SignerInfo *si); |
diff --git a/src/lib/libcrypto/rsa/rsa_local.h b/src/lib/libcrypto/rsa/rsa_local.h index f2639d59b1..d537ab9c77 100644 --- a/src/lib/libcrypto/rsa/rsa_local.h +++ b/src/lib/libcrypto/rsa/rsa_local.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_local.h,v 1.7 2023/11/29 21:35:57 tb Exp $ */ | 1 | /* $OpenBSD: rsa_local.h,v 1.8 2024/01/01 15:43:02 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 | * |
@@ -60,10 +60,6 @@ __BEGIN_HIDDEN_DECLS | |||
60 | 60 | ||
61 | #define RSA_MIN_MODULUS_BITS 512 | 61 | #define RSA_MIN_MODULUS_BITS 512 |
62 | 62 | ||
63 | /* Macros to test if a pkey or ctx is for a PSS key */ | ||
64 | #define pkey_is_pss(pkey) (pkey->ameth->pkey_id == EVP_PKEY_RSA_PSS) | ||
65 | #define pkey_ctx_is_pss(ctx) (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) | ||
66 | |||
67 | struct rsa_meth_st { | 63 | struct rsa_meth_st { |
68 | char *name; | 64 | char *name; |
69 | int (*rsa_pub_enc)(int flen, const unsigned char *from, | 65 | int (*rsa_pub_enc)(int flen, const unsigned char *from, |