Skip to content

Commit

Permalink
[crypto] Expose RSA_CTX_SIZE constant
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Jun 20, 2017
1 parent a6a5825 commit 5b608bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/rsa.c
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions src/include/ipxe/rsa.h
Expand Up @@ -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 */

0 comments on commit 5b608bb

Please sign in to comment.