Encode RSA public keys in RFC 3110 DNSKEY format
This commit is contained in:
committed by
Tobias Brunner
parent
f2145c8d3a
commit
a4ddc0bb26
@@ -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"},
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user