Welcome to mirror list, hosted at ThFree Co, Russian Federation.

host_ca_new_free.c « utils - github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4c91c3200e7993fcd96016b2ac16d187fa15c25f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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);
}