]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pki: Enable PSS padding if enabled in strongswan.conf
authorTobias Brunner <tobias@strongswan.org>
Mon, 30 Oct 2017 16:54:44 +0000 (17:54 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 8 Nov 2017 15:48:10 +0000 (16:48 +0100)
src/pki/commands/acert.c
src/pki/commands/issue.c
src/pki/commands/req.c
src/pki/commands/self.c
src/pki/commands/signcrl.c

index 992237e2db7889ab830ed1212f361c4905d9969d..d1ea5c65ebb448bcb3e294e318516546e3b70098 100644 (file)
@@ -45,7 +45,8 @@ static int acert()
        char *datenb = NULL, *datena = NULL, *dateform = NULL;
        rng_t *rng;
        char *arg;
-       bool pss = FALSE;
+       bool pss = lib->settings->get_bool(lib->settings, "%s.rsa_pss", FALSE,
+                                                                          lib->ns);
 
        groups = linked_list_create();
 
index ab6e97b839d6c0d2aa6eed989323ed88833b2d73..1ccbca89f51e5935367e1d652d3681a00de25934 100644 (file)
@@ -67,7 +67,7 @@ static int issue()
        public_key_t *public = NULL;
        credential_type_t type = CRED_PUBLIC_KEY;
        key_type_t subtype = KEY_ANY;
-       bool pkcs10 = FALSE, pss = FALSE;
+       bool pkcs10 = FALSE;
        char *file = NULL, *dn = NULL, *hex = NULL, *cacert = NULL, *cakey = NULL;
        char *error = NULL, *keyid = NULL;
        identification_t *id = NULL;
@@ -85,6 +85,8 @@ static int issue()
        x509_cert_policy_t *policy = NULL;
        traffic_selector_t *ts;
        char *arg;
+       bool pss = lib->settings->get_bool(lib->settings, "%s.rsa_pss", FALSE,
+                                                                          lib->ns);
 
        san = linked_list_create();
        cdps = linked_list_create();
index 4a63091c8b357394b3773d739f2cb50f81076964..cfddbc455403f13c8478ec740f5a83e276ce1c99 100644 (file)
@@ -39,7 +39,8 @@ static int req()
        chunk_t encoding = chunk_empty;
        chunk_t challenge_password = chunk_empty;
        char *arg;
-       bool pss = FALSE;
+       bool pss = lib->settings->get_bool(lib->settings, "%s.rsa_pss", FALSE,
+                                                                          lib->ns);
 
        san = linked_list_create();
 
index 763f0473e5c463d7fa589e3913516db87db1bce3..6f7adef0f8c4c0f38a7b1691b50458c07e00ea00 100644 (file)
@@ -71,7 +71,8 @@ static int self()
        x509_cert_policy_t *policy = NULL;
        traffic_selector_t *ts;
        char *arg;
-       bool pss = FALSE;
+       bool pss = lib->settings->get_bool(lib->settings, "%s.rsa_pss", FALSE,
+                                                                          lib->ns);
 
        san = linked_list_create();
        ocsp = linked_list_create();
index e0a9a1deb08e8aae1cb741cb9b8e61df96cd38cc..50f9396877354ffec116ac5b9f82286f3ed9f70c 100644 (file)
@@ -134,7 +134,8 @@ static int sign_crl()
        x509_cdp_t *cdp;
        chunk_t crl_serial = chunk_empty, baseCrlNumber = chunk_empty;
        chunk_t encoding = chunk_empty;
-       bool pss = FALSE;
+       bool pss = lib->settings->get_bool(lib->settings, "%s.rsa_pss", FALSE,
+                                                                          lib->ns);
 
        list = linked_list_create();
        cdps = linked_list_create();