summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-01-01 15:43:03 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-01-01 15:43:03 +0000
commitb33ad73f90669e1635591c16fbd13ab1942f378b (patch)
treeeb917b577ea419f22f1bff4775c8d81c12abcf56 /lib/libcrypto/rsa
parentc90c4cc1ed43b63eeee26ade7490f5005291bc32 (diff)
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 'lib/libcrypto/rsa')
-rw-r--r--lib/libcrypto/rsa/rsa_ameth.c6
-rw-r--r--lib/libcrypto/rsa/rsa_local.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/libcrypto/rsa/rsa_ameth.c b/lib/libcrypto/rsa/rsa_ameth.c
index a43bcf9f9a0..2266f0cbd53 100644
--- a/lib/libcrypto/rsa/rsa_ameth.c
+++ b/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);
diff --git a/lib/libcrypto/rsa/rsa_local.h b/lib/libcrypto/rsa/rsa_local.h
index f2639d59b10..d537ab9c77c 100644
--- a/lib/libcrypto/rsa/rsa_local.h
+++ b/lib/libcrypto/rsa/rsa_local.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_local.h,v 1.7 2023/11/29 21:35:57 tb Exp $ */
+/* $OpenBSD: rsa_local.h,v 1.8 2024/01/01 15:43:02 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -60,10 +60,6 @@ __BEGIN_HIDDEN_DECLS
#define RSA_MIN_MODULUS_BITS 512
-/* 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)
-
struct rsa_meth_st {
char *name;
int (*rsa_pub_enc)(int flen, const unsigned char *from,