From 46a80c9db08485a9a18e41384898daf81e05f9cb Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 28 Jan 2015 13:37:55 +0100 Subject: [PATCH] pki: Support extracting public keys from CGA parameters --- src/pki/commands/pub.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pki/commands/pub.c b/src/pki/commands/pub.c index 843b784b48..1ff86f7ca5 100644 --- a/src/pki/commands/pub.c +++ b/src/pki/commands/pub.c @@ -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"}, -- 2.47.2