summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/crypto/rsa.c2
-rw-r--r--src/include/ipxe/rsa.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/crypto/rsa.c b/src/crypto/rsa.c
index 36109280..7ac0bca5 100644
--- a/src/crypto/rsa.c
+++ b/src/crypto/rsa.c
@@ -625,7 +625,7 @@ static int rsa_match ( const void *private_key, size_t private_key_len,
/** RSA public-key algorithm */
struct pubkey_algorithm rsa_algorithm = {
.name = "rsa",
- .ctxsize = sizeof ( struct rsa_context ),
+ .ctxsize = RSA_CTX_SIZE,
.init = rsa_init,
.max_len = rsa_max_len,
.encrypt = rsa_encrypt,
diff --git a/src/include/ipxe/rsa.h b/src/include/ipxe/rsa.h
index d947eec7..a1b5e0c0 100644
--- a/src/include/ipxe/rsa.h
+++ b/src/include/ipxe/rsa.h
@@ -77,6 +77,9 @@ struct rsa_context {
void *tmp;
};
+/** RSA context size */
+#define RSA_CTX_SIZE sizeof ( struct rsa_context )
+
extern struct pubkey_algorithm rsa_algorithm;
#endif /* _IPXE_RSA_H */