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
 /** RSA public-key algorithm */
625
 /** RSA public-key algorithm */
626
 struct pubkey_algorithm rsa_algorithm = {
626
 struct pubkey_algorithm rsa_algorithm = {
627
 	.name		= "rsa",
627
 	.name		= "rsa",
628
-	.ctxsize	= sizeof ( struct rsa_context ),
628
+	.ctxsize	= RSA_CTX_SIZE,
629
 	.init		= rsa_init,
629
 	.init		= rsa_init,
630
 	.max_len	= rsa_max_len,
630
 	.max_len	= rsa_max_len,
631
 	.encrypt	= rsa_encrypt,
631
 	.encrypt	= rsa_encrypt,

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

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

Loading…
Cancel
Save