X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilccrypt%2Fsilcpkcs.c;h=74fd6f03ab8b5a3ed35d106a288ec8853d05e7b9;hb=52e57c880aba9c5e89f59d962eb9af75670b76e0;hp=f5ae7873274dcb762bb75d695820df6941122066;hpb=8fd8212bcd16f2b53fbedff2a9b9a4e8c15b9695;p=silc.git diff --git a/lib/silccrypt/silcpkcs.c b/lib/silccrypt/silcpkcs.c index f5ae7873..74fd6f03 100644 --- a/lib/silccrypt/silcpkcs.c +++ b/lib/silccrypt/silcpkcs.c @@ -513,7 +513,7 @@ SilcUInt32 silc_pkcs_public_key_get_len(SilcPublicKey public_key) void *silc_pkcs_get_context(SilcPKCSType type, SilcPublicKey public_key) { if (public_key->pkcs->type != type) - return FALSE; + return NULL; return public_key->public_key; } @@ -693,6 +693,7 @@ SilcBool silc_pkcs_load_public_key(const char *filename, silc_free(data); silc_free(public_key); + *ret_public_key = NULL; return FALSE; } @@ -778,6 +779,7 @@ SilcBool silc_pkcs_load_private_key(const char *filename, silc_free(data); silc_free(private_key); + *ret_private_key = NULL; return FALSE; }