[openssh-commits] [openssh] 02/11: upstream: allow PEM export of DSA and ECDSA keys; bz3091, patch

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Jan 25 11:36:28 AEDT 2020


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 8dfb6a202c96cdf037c8ce05e53e32e0e0b7b454
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Fri Jan 24 00:00:31 2020 +0000

    upstream: allow PEM export of DSA and ECDSA keys; bz3091, patch
    
    from Jakub Jelen ok markus@
    
    OpenBSD-Commit-ID: a58edec8b9f07acab4b962a71a5125830d321b51
---
 ssh-keygen.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ssh-keygen.c b/ssh-keygen.c
index 363da70d..564c3c48 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.388 2020/01/23 23:31:52 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.389 2020/01/24 00:00:31 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -402,6 +402,14 @@ do_convert_to_pem(struct sshkey *k)
 		if (!PEM_write_RSAPublicKey(stdout, k->rsa))
 			fatal("PEM_write_RSAPublicKey failed");
 		break;
+	case KEY_DSA:
+		if (!PEM_write_DSA_PUBKEY(stdout, k->dsa))
+			fatal("PEM_write_DSA_PUBKEY failed");
+		break;
+	case KEY_ECDSA:
+		if (!PEM_write_EC_PUBKEY(stdout, k->ecdsa))
+			fatal("PEM_write_EC_PUBKEY failed");
+		break;
 	default:
 		fatal("%s: unsupported key type %s", __func__, sshkey_type(k));
 	}

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list