mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22: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:
@ -26,7 +26,7 @@ add_sources_from_current_dir(utils
|
||||
encode_utf8.c
|
||||
encode_wide_string_as_utf8.c
|
||||
fgetline.c
|
||||
host_ca_free.c
|
||||
host_ca_new_free.c
|
||||
host_strchr.c
|
||||
host_strchr_internal.c
|
||||
host_strcspn.c
|
||||
|
@ -2,6 +2,13 @@
|
||||
#include "misc.h"
|
||||
#include "storage.h"
|
||||
|
||||
host_ca *host_ca_new(void)
|
||||
{
|
||||
host_ca *hca = snew(host_ca);
|
||||
memset(hca, 0, sizeof(*hca));
|
||||
return hca;
|
||||
}
|
||||
|
||||
void host_ca_free(host_ca *hca)
|
||||
{
|
||||
sfree(hca->name);
|
Reference in New Issue
Block a user