]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[crypto] Expose RSA_CTX_SIZE constant
authorMichael Brown <mcb30@ipxe.org>
Tue, 13 Jun 2017 11:09:52 +0000 (12:09 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 20 Jun 2017 08:49:00 +0000 (09:49 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/crypto/rsa.c
src/include/ipxe/rsa.h

index 36109280dc7739aea69f8d04ab1b566afdf68d1e..7ac0bca593f88d7bd7d9ccba4c499a81cd4963a3 100644 (file)
@@ -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,
index d947eec7332781d849776780cf2e2aa532a295a9..a1b5e0c0399c832a3fd5293ba497b0a1875a5deb 100644 (file)
@@ -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 */