Encode RSA public keys in RFC 3110 DNSKEY format

This commit is contained in:
Andreas Steffen
2013-02-19 12:25:00 +01:00
committed by Tobias Brunner
parent f2145c8d3a
commit a4ddc0bb26
8 changed files with 155 additions and 3 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ static void __attribute__ ((constructor))reg()
pub, 'p', "pub",
"extract the public key from a private key/certificate",
{"[--in file|--keyid hex] [--type rsa|ecdsa|pkcs10|x509]",
"[--outform der|pem|pgp]"},
"[--outform der|pem|pgp|dnskey]"},
{
{"help", 'h', 0, "show usage information"},
{"in", 'i', 1, "input file, default: stdin"},
+11
View File
@@ -76,6 +76,17 @@ bool get_form(char *form, cred_encoding_type_t *enc, credential_type_t type)
return FALSE;
}
}
else if (streq(form, "dnskey"))
{
switch (type)
{
case CRED_PUBLIC_KEY:
*enc =PUBKEY_DNSKEY;
return TRUE;
default:
return FALSE;
}
}
return FALSE;
}