Sfoglia il codice sorgente

[crypto] Expose RSA_CTX_SIZE constant

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 anni fa
parent
commit
5b608bbfe0
2 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 1
    1
      src/crypto/rsa.c
  2. 3
    0
      src/include/ipxe/rsa.h

+ 1
- 1
src/crypto/rsa.c Vedi 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 Vedi 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…
Annulla
Salva