aboutsummaryrefslogtreecommitdiff
path: root/src/pki_crypto.c
diff options
context:
space:
mode:
authorAxel Eppe <aeppe@google.com>2015-08-23 17:26:11 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-09-07 13:29:23 +0200
commit6da4e21065c30eee630cf448b4f45d29815c6f14 (patch)
treed1a948dee74281e5a7fd27e2ef011a6288fd4a41 /src/pki_crypto.c
parent7bfe8d2f036b67cad164e5a74ede9f8c98912f3d (diff)
downloadlibssh-6da4e21065c30eee630cf448b4f45d29815c6f14.tar.gz
libssh-6da4e21065c30eee630cf448b4f45d29815c6f14.tar.xz
libssh-6da4e21065c30eee630cf448b4f45d29815c6f14.zip
pki: Add rsa, dss certificate key type definitions
- Add rsa/dsa (ssh-{rsa,dss}-cert-v01@openssh.com) as key types. - Add a cert_type member in the ssh_key struct. Signed-off-by: Axel Eppe <aeppe@google.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/pki_crypto.c')
-rw-r--r--src/pki_crypto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index ab549c11..d656e359 100644
--- a/src/pki_crypto.c
+++ b/src/pki_crypto.c
@@ -651,6 +651,8 @@ ssh_string pki_private_key_to_pem(const ssh_key key,
BIO_free(mem);
SSH_LOG(SSH_LOG_WARN, "PEM output not supported for key type ssh-ed25519");
return NULL;
+ case SSH_KEYTYPE_DSS_CERT01:
+ case SSH_KEYTYPE_RSA_CERT01:
case SSH_KEYTYPE_UNKNOWN:
BIO_free(mem);
SSH_LOG(SSH_LOG_WARN, "Unkown or invalid private key type %d", key->type);
@@ -780,6 +782,8 @@ ssh_key pki_private_key_from_base64(const char *b64_key,
#endif
case SSH_KEYTYPE_ED25519:
/* Cannot open ed25519 keys with libcrypto */
+ case SSH_KEYTYPE_DSS_CERT01:
+ case SSH_KEYTYPE_RSA_CERT01:
case SSH_KEYTYPE_UNKNOWN:
BIO_free(mem);
SSH_LOG(SSH_LOG_WARN, "Unkown or invalid private key type %d", type);