mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:45:07 -05:00
siv: deinit gnutls on unsupported SIV
This commit is contained in:
@@ -102,8 +102,11 @@ SIV_CreateInstance(SIV_Algorithm algorithm)
|
|||||||
init_gnutls();
|
init_gnutls();
|
||||||
|
|
||||||
/* Check if the cipher is actually supported */
|
/* Check if the cipher is actually supported */
|
||||||
if (gnutls_cipher_get_tag_size(calgo) == 0)
|
if (gnutls_cipher_get_tag_size(calgo) == 0) {
|
||||||
|
if (instance_counter == 0)
|
||||||
|
deinit_gnutls();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
instance = MallocNew(struct SIV_Instance_Record);
|
instance = MallocNew(struct SIV_Instance_Record);
|
||||||
instance->algorithm = calgo;
|
instance->algorithm = calgo;
|
||||||
|
|||||||
Reference in New Issue
Block a user