1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Centralise creation of a host_ca structure.

This will allow the central host_ca_new function to pre-populate the
structure with default values for the fields, so that once I add more
options to CA configuration they can take their default values when
loading a saved record from a previous PuTTY version.
This commit is contained in:
Simon Tatham
2022-05-02 07:40:52 +01:00
parent 619bb441ec
commit e34e0220ab
5 changed files with 12 additions and 5 deletions

View File

@ -643,8 +643,7 @@ host_ca *host_ca_load(const char *name)
if (!fp)
return NULL;
host_ca *hca = snew(host_ca);
memset(hca, 0, sizeof(*hca));
host_ca *hca = host_ca_new();
hca->name = dupstr(name);
size_t wcsize = 0;