]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pki: Support extracting public keys from CGA parameters
authorMartin Willi <martin@revosec.ch>
Wed, 28 Jan 2015 12:37:55 +0000 (13:37 +0100)
committerMartin Willi <martin@revosec.ch>
Tue, 24 Feb 2015 16:13:57 +0000 (17:13 +0100)
src/pki/commands/pub.c

index 843b784b48d201700e2e1a355cb926579b1043eb..1ff86f7ca5c206cfc879b5c1f2b0bb699127da1d 100644 (file)
@@ -73,6 +73,11 @@ static int pub()
                                        type = CRED_CERTIFICATE;
                                        subtype = CERT_X509;
                                }
+                               else if (streq(arg, "cga"))
+                               {
+                                       type = CRED_CERTIFICATE;
+                                       subtype = CERT_CGA_PARAMS;
+                               }
                                else
                                {
                                        return command_usage("invalid input type");
@@ -188,7 +193,7 @@ static void __attribute__ ((constructor))reg()
        command_register((command_t) {
                pub, 'p', "pub",
                "extract the public key from a private key/certificate",
-               {"[--in file|--keyid hex] [--type rsa|ecdsa|bliss|pub|pkcs10|x509]",
+               {"[--in file|--keyid hex] [--type rsa|ecdsa|bliss|pub|pkcs10|x509|cga]",
                 "[--outform der|pem|dnskey|sshkey]"},
                {
                        {"help",        'h', 0, "show usage information"},