1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/utils/host_ca_new_free.c

23 lines
473 B
C
Raw Normal View History

#include "defs.h"
#include "misc.h"
#include "storage.h"
host_ca *host_ca_new(void)
{
host_ca *hca = snew(host_ca);
memset(hca, 0, sizeof(*hca));
hca->opts.permit_rsa_sha1 = false;
hca->opts.permit_rsa_sha256 = true;
hca->opts.permit_rsa_sha512 = true;
return hca;
}
void host_ca_free(host_ca *hca)
{
sfree(hca->name);
sfree(hca->validity_expression);
if (hca->ca_public_key)
strbuf_free(hca->ca_public_key);
sfree(hca);
}