swanctl: Load pubkeys with load-creds

This commit is contained in:
Andreas Steffen 2016-01-05 23:52:55 +01:00
parent b83cef2412
commit abe6d07463
2 changed files with 8 additions and 6 deletions

View File

@ -29,12 +29,13 @@ typedef struct {
} cert_type_t;
static cert_type_t cert_types[] = {
{ "x509", CERT_X509, X509_NONE },
{ "x509ca", CERT_X509, X509_CA },
{ "x509ocsp", CERT_X509, X509_OCSP_SIGNER },
{ "x509aa", CERT_X509, X509_AA },
{ "x509ac", CERT_X509_AC, X509_NONE },
{ "x509crl", CERT_X509_CRL, X509_NONE },
{ "x509", CERT_X509, X509_NONE },
{ "x509ca", CERT_X509, X509_CA },
{ "x509ocsp", CERT_X509, X509_OCSP_SIGNER },
{ "x509aa", CERT_X509, X509_AA },
{ "x509ac", CERT_X509_AC, X509_NONE },
{ "x509crl", CERT_X509_CRL, X509_NONE },
{ "pubkey", CERT_TRUSTED_PUBKEY, X509_NONE },
};
bool vici_cert_info_from_str(char *type_str, certificate_type_t *type,

View File

@ -698,6 +698,7 @@ int load_creds_cfg(vici_conn_t *conn, command_format_options_t format,
load_certs(conn, format, "x509aa", SWANCTL_X509AADIR);
load_certs(conn, format, "x509ac", SWANCTL_X509ACDIR);
load_certs(conn, format, "x509crl", SWANCTL_X509CRLDIR);
load_certs(conn, format, "pubkey", SWANCTL_PUBKEYDIR);
load_keys(conn, format, noprompt, cfg, "rsa", SWANCTL_RSADIR);
load_keys(conn, format, noprompt, cfg, "ecdsa", SWANCTL_ECDSADIR);