From d256ca944247bb2fd2ab63bcfda5a170f1b0d0ea Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 1 Jan 2024 15:43:02 +0000 Subject: 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. --- src/lib/libcrypto/rsa/rsa_ameth.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/rsa/rsa_ameth.c') 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 @@ -/* $OpenBSD: rsa_ameth.c,v 1.53 2023/12/28 21:58:12 tb Exp $ */ +/* $OpenBSD: rsa_ameth.c,v 1.54 2024/01/01 15:43:02 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -74,6 +74,10 @@ #include "rsa_local.h" #include "x509_local.h" +/* Macros to test if a pkey or ctx is for a PSS key */ +#define pkey_is_pss(pkey) (pkey->ameth->pkey_id == EVP_PKEY_RSA_PSS) +#define pkey_ctx_is_pss(ctx) (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) + #ifndef OPENSSL_NO_CMS static int rsa_cms_sign(CMS_SignerInfo *si); static int rsa_cms_verify(CMS_SignerInfo *si); -- cgit v1.2.3-55-g6feb