mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:05:06 -05:00
siv: deinit gnutls on unsupported SIV
This commit is contained in:
@@ -102,8 +102,11 @@ SIV_CreateInstance(SIV_Algorithm algorithm)
|
||||
init_gnutls();
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
instance = MallocNew(struct SIV_Instance_Record);
|
||||
instance->algorithm = calgo;
|
||||
|
||||
Reference in New Issue
Block a user