Browse Source

[crypto] Expose RSA_CTX_SIZE constant

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 years ago
parent
commit
5b608bbfe0
2 changed files with 4 additions and 1 deletions
  1. 1
    1
      src/crypto/rsa.c
  2. 3
    0
      src/include/ipxe/rsa.h

+ 1
- 1
src/crypto/rsa.c View File

@@ -625,7 +625,7 @@ static int rsa_match ( const void *private_key, size_t private_key_len,
625 625
 /** RSA public-key algorithm */
626 626
 struct pubkey_algorithm rsa_algorithm = {
627 627
 	.name		= "rsa",
628
-	.ctxsize	= sizeof ( struct rsa_context ),
628
+	.ctxsize	= RSA_CTX_SIZE,
629 629
 	.init		= rsa_init,
630 630
 	.max_len	= rsa_max_len,
631 631
 	.encrypt	= rsa_encrypt,

+ 3
- 0
src/include/ipxe/rsa.h View File

@@ -77,6 +77,9 @@ struct rsa_context {
77 77
 	void *tmp;
78 78
 };
79 79
 
80
+/** RSA context size */
81
+#define RSA_CTX_SIZE sizeof ( struct rsa_context )
82
+
80 83
 extern struct pubkey_algorithm rsa_algorithm;
81 84
 
82 85
 #endif /* _IPXE_RSA_H */

Loading…
Cancel
Save