swanctl: Load pubkeys with load-creds
authorAndreas Steffen <andreas.steffen@strongswan.org>
Tue, 5 Jan 2016 22:52:55 +0000 (23:52 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sat, 9 Jan 2016 06:23:30 +0000 (07:23 +0100)
src/libcharon/plugins/vici/vici_cert_info.c
src/swanctl/commands/load_creds.c

index 61871e2..2f278de 100644 (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,
index 81204ca..4647934 100644 (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);