Skip to content
Snippets Groups Projects
Commit f02e32b2 authored by Niels Möller's avatar Niels Möller
Browse files

* rsa2sexp.c (rsa_keypair_to_sexp): New argument ALGORITHM_NAME.

* examples/rsa-keygen.c (main): Updated call to rsa_keypair_to_sexp.

Rev: src/nettle/examples/rsa-keygen.c:1.9
parent 9724eaee
No related branches found
No related tags found
No related merge requests found
...@@ -124,13 +124,13 @@ main(int argc, char **argv) ...@@ -124,13 +124,13 @@ main(int argc, char **argv)
nettle_buffer_init(&priv_buffer); nettle_buffer_init(&priv_buffer);
nettle_buffer_init(&pub_buffer); nettle_buffer_init(&pub_buffer);
if (!rsa_keypair_to_sexp(&pub_buffer, &pub, NULL)) if (!rsa_keypair_to_sexp(&pub_buffer, "rsa-pkcs1-sha1", &pub, NULL))
{ {
werror("Formatting public key failed.\n"); werror("Formatting public key failed.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
} }
if (!rsa_keypair_to_sexp(&priv_buffer, &pub, &priv)) if (!rsa_keypair_to_sexp(&priv_buffer, "rsa-pkcs1-sha1", &pub, &priv))
{ {
werror("Formatting private key failed.\n"); werror("Formatting private key failed.\n");
return EXIT_FAILURE; return EXIT_FAILURE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment