diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-09-24 17:42:01 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-09-24 17:42:01 +0200 |
commit | 410a801ac3345c6ae8e732174989d9c2986faf36 (patch) | |
tree | 9be82084f4a8d1caf88e0a4be7297cdf48b70309 /lib/x509/x509_write.c | |
parent | 5fb83cf24ed06883d7f8f0e94726e07436ab86bf (diff) | |
download | gnutls-410a801ac3345c6ae8e732174989d9c2986faf36.tar.gz |
gnutls_x509_crt/q_set_spki: always initialize the spki structure
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/x509/x509_write.c')
-rw-r--r-- | lib/x509/x509_write.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c index e4df604861..6d5ed6a52e 100644 --- a/lib/x509/x509_write.c +++ b/lib/x509/x509_write.c @@ -2063,6 +2063,8 @@ gnutls_x509_crt_set_spki(gnutls_x509_crt_t crt, goto cleanup; } + memset(&tpki, 0, sizeof(gnutls_x509_spki_st)); + if (crt_pk == GNUTLS_PK_RSA) { const mac_entry_st *me; @@ -2073,7 +2075,6 @@ gnutls_x509_crt_set_spki(gnutls_x509_crt_t crt, goto cleanup; } - memset(&tpki, 0, sizeof(gnutls_x509_spki_st)); tpki.pk = spki->pk; tpki.rsa_pss_dig = spki->rsa_pss_dig; |