- implemented sc_pkcs15_free_pubkey

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@330 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2002-03-15 10:01:25 +00:00
parent 7ec8498962
commit 41cd4c4d2c
3 changed files with 10 additions and 0 deletions

View File

@ -262,6 +262,7 @@ int sc_pkcs15_read_pubkey(struct sc_pkcs15_card *card,
struct sc_pkcs15_pubkey_rsa **out);
int sc_pkcs15_parse_pubkey_rsa(struct sc_context *ctx,
struct sc_pkcs15_pubkey_rsa *pubkey);
void sc_pkcs15_free_pubkey(struct sc_pkcs15_pubkey_rsa *pubkey);
void sc_pkcs15_print_cert_info(const struct sc_pkcs15_cert_info *cert);
int sc_pkcs15_read_certificate(struct sc_pkcs15_card *card,

View File

@ -231,3 +231,11 @@ sc_pkcs15_read_pubkey(struct sc_pkcs15_card *p15card,
*out = pubkey;
return 0;
}
void sc_pkcs15_free_pubkey(struct sc_pkcs15_pubkey_rsa *key)
{
assert(key != NULL);
free(key->modulus);
free(key->data);
free(key);
}

View File

@ -262,6 +262,7 @@ int sc_pkcs15_read_pubkey(struct sc_pkcs15_card *card,
struct sc_pkcs15_pubkey_rsa **out);
int sc_pkcs15_parse_pubkey_rsa(struct sc_context *ctx,
struct sc_pkcs15_pubkey_rsa *pubkey);
void sc_pkcs15_free_pubkey(struct sc_pkcs15_pubkey_rsa *pubkey);
void sc_pkcs15_print_cert_info(const struct sc_pkcs15_cert_info *cert);
int sc_pkcs15_read_certificate(struct sc_pkcs15_card *card,