[crypto] Expose RSA_CTX_SIZE constant
Signed-off-by: Michael Brown <mcb30@ipxe.org>
diff --git a/src/crypto/rsa.c b/src/crypto/rsa.c
index 3610928..7ac0bca 100644
--- a/src/crypto/rsa.c
+++ b/src/crypto/rsa.c
@@ -625,7 +625,7 @@
/** 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 d947eec..a1b5e0c 100644
--- a/src/include/ipxe/rsa.h
+++ b/src/include/ipxe/rsa.h
@@ -77,6 +77,9 @@
void *tmp;
};
+/** RSA context size */
+#define RSA_CTX_SIZE sizeof ( struct rsa_context )
+
extern struct pubkey_algorithm rsa_algorithm;
#endif /* _IPXE_RSA_H */