summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ssh-keygen.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index d2736eee2..e8e2a2aa0 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.309 2017/12/18 02:25:15 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.310 2018/02/07 05:15:49 jsing Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -377,13 +377,6 @@ do_convert_to_pem(struct sshkey *k)
377 if (!PEM_write_RSAPublicKey(stdout, k->rsa)) 377 if (!PEM_write_RSAPublicKey(stdout, k->rsa))
378 fatal("PEM_write_RSAPublicKey failed"); 378 fatal("PEM_write_RSAPublicKey failed");
379 break; 379 break;
380#if notyet /* OpenSSH 0.9.8 lacks this function */
381 case KEY_DSA:
382 if (!PEM_write_DSAPublicKey(stdout, k->dsa))
383 fatal("PEM_write_DSAPublicKey failed");
384 break;
385#endif
386 /* XXX ECDSA? */
387 default: 380 default:
388 fatal("%s: unsupported key type %s", __func__, sshkey_type(k)); 381 fatal("%s: unsupported key type %s", __func__, sshkey_type(k));
389 } 382 }
@@ -671,9 +664,6 @@ do_convert_from_pem(struct sshkey **k, int *private)
671{ 664{
672 FILE *fp; 665 FILE *fp;
673 RSA *rsa; 666 RSA *rsa;
674#ifdef notyet
675 DSA *dsa;
676#endif
677 667
678 if ((fp = fopen(identity_file, "r")) == NULL) 668 if ((fp = fopen(identity_file, "r")) == NULL)
679 fatal("%s: %s: %s", __progname, identity_file, strerror(errno)); 669 fatal("%s: %s: %s", __progname, identity_file, strerror(errno));
@@ -685,18 +675,6 @@ do_convert_from_pem(struct sshkey **k, int *private)
685 fclose(fp); 675 fclose(fp);
686 return; 676 return;
687 } 677 }
688#if notyet /* OpenSSH 0.9.8 lacks this function */
689 rewind(fp);
690 if ((dsa = PEM_read_DSAPublicKey(fp, NULL, NULL, NULL)) != NULL) {
691 if ((*k = sshkey_new(KEY_UNSPEC)) == NULL)
692 fatal("sshkey_new failed");
693 (*k)->type = KEY_DSA;
694 (*k)->dsa = dsa;
695 fclose(fp);
696 return;
697 }
698 /* XXX ECDSA */
699#endif
700 fatal("%s: unrecognised raw private key format", __func__); 678 fatal("%s: unrecognised raw private key format", __func__);
701} 679}
702 680