- When storing a private key, always store the public portion as well

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@290 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2002-03-11 11:52:04 +00:00
parent 52dac164ba
commit b5bc6d74fd
1 changed files with 6 additions and 1 deletions

View File

@ -344,7 +344,12 @@ do_store_private_key(struct sc_profile *profile)
if (r < 0)
goto failed;
/* XXX: store public key as well */
/* Always store public key as well.
* XXX allow caller to turn this off? */
r = sc_pkcs15init_store_public_key(p15card, profile, &args);
if (r < 0)
goto failed;
return 0;
failed: error("Failed to store private key: %s\n", sc_strerror(r));