mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-06 00:00:47 -04:00
streamlined file loading labels
This commit is contained in:
parent
289ce4ade6
commit
51a9db85f4
@ -820,13 +820,15 @@ void load_acerts(void)
|
||||
{
|
||||
while (n--)
|
||||
{
|
||||
char *filename = filelist[n]->d_name;
|
||||
x509acert_t *ac;
|
||||
|
||||
ac = lib->creds->create(lib->creds, CRED_CERTIFICATE,
|
||||
CERT_PLUTO_AC, BUILD_FROM_FILE, filelist[n]->d_name,
|
||||
CERT_PLUTO_AC, BUILD_FROM_FILE, filename,
|
||||
BUILD_END);
|
||||
if (ac)
|
||||
{
|
||||
plog(" loaded attribute certificate from '%s'", filename);
|
||||
add_acert(ac);
|
||||
}
|
||||
free(filelist[n]);
|
||||
|
@ -144,7 +144,7 @@ private_key_t* load_private_key(char* filename, prompt_pass_t *pass,
|
||||
}
|
||||
if (key)
|
||||
{
|
||||
plog(" loaded private key from file '%s'", filename);
|
||||
plog(" loaded private key from '%s'", filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -165,7 +165,7 @@ bool load_cert(char *filename, const char *label, cert_t *out)
|
||||
if (cert)
|
||||
{
|
||||
/* the API passes an empty cert_t, we move over and free the built one */
|
||||
plog(" loaded '%s' certificate from '%s'", label, filename);
|
||||
plog(" loaded %s certificate from '%s'", label, filename);
|
||||
*out = *cert;
|
||||
free(cert);
|
||||
return TRUE;
|
||||
@ -180,7 +180,7 @@ bool load_host_cert(char *filename, cert_t *cert)
|
||||
{
|
||||
char *path = concatenate_paths(HOST_CERT_PATH, filename);
|
||||
|
||||
return load_cert(path, "host cert", cert);
|
||||
return load_cert(path, "host", cert);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -190,7 +190,7 @@ bool load_ca_cert(char *filename, cert_t *cert)
|
||||
{
|
||||
char *path = concatenate_paths(CA_CERT_PATH, filename);
|
||||
|
||||
return load_cert(path, "CA cert", cert);
|
||||
return load_cert(path, "CA", cert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -350,6 +350,7 @@ void load_crls(void)
|
||||
{
|
||||
chunk_t crl_uri;
|
||||
|
||||
plog(" loaded crl from '%s'", filename);
|
||||
crl_uri.len = 7 + sizeof(CRL_PATH) + strlen(filename);
|
||||
crl_uri.ptr = malloc(crl_uri.len + 1);
|
||||
|
||||
|
@ -717,11 +717,11 @@ int main(int argc, char **argv)
|
||||
#endif /* CAPABILITIES */
|
||||
|
||||
/* loading X.509 CA certificates */
|
||||
load_authcerts("CA cert", CA_CERT_PATH, AUTH_CA);
|
||||
load_authcerts("CA", CA_CERT_PATH, AUTH_CA);
|
||||
/* loading X.509 AA certificates */
|
||||
load_authcerts("AA cert", AA_CERT_PATH, AUTH_AA);
|
||||
load_authcerts("AA", AA_CERT_PATH, AUTH_AA);
|
||||
/* loading X.509 OCSP certificates */
|
||||
load_authcerts("OCSP cert", OCSP_CERT_PATH, AUTH_OCSP);
|
||||
load_authcerts("OCSP", OCSP_CERT_PATH, AUTH_OCSP);
|
||||
/* loading X.509 CRLs */
|
||||
load_crls();
|
||||
/* loading attribute certificates (experimental) */
|
||||
|
@ -1,5 +1,5 @@
|
||||
moon::cat /var/log/auth.log::loaded crl file::YES
|
||||
carol::cat /var/log/auth.log::loaded crl file::YES
|
||||
moon::cat /var/log/auth.log::loaded crl from::YES
|
||||
carol::cat /var/log/auth.log::loaded crl from::YES
|
||||
moon::cat /var/log/auth.log::X.509 certificate rejected::NO
|
||||
carol::cat /var/log/auth.log::X.509 certificate rejected::NO
|
||||
moon::ipsec status::rw.*STATE_QUICK_R2.*IPsec SA established::YES
|
||||
|
@ -1,5 +1,5 @@
|
||||
moon::cat /var/log/auth.log::loaded crl file::YES
|
||||
carol::cat /var/log/auth.log::loaded crl file::YES
|
||||
moon::cat /var/log/auth.log::loaded crl from::YES
|
||||
carol::cat /var/log/auth.log::loaded crl from::YES
|
||||
moon::cat /var/log/auth.log::crl update is overdue::YES
|
||||
carol::cat /var/log/auth.log::crl update is overdue::YES
|
||||
moon::cat /var/log/auth.log::X.509 certificate rejected::YES
|
||||
|
Loading…
x
Reference in New Issue
Block a user