summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 564c3c481..f2192edb9 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.389 2020/01/24 00:00:31 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.390 2020/01/24 00:27:04 djm 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
@@ -1788,10 +1788,14 @@ do_ca_sign(struct passwd *pw, const char *ca_key_path, int prefer_agent,
1788 } 1788 }
1789 free(tmp); 1789 free(tmp);
1790 1790
1791 if (key_type_name != NULL && 1791 if (key_type_name != NULL) {
1792 sshkey_type_from_name(key_type_name) != ca->type) { 1792 if (sshkey_type_from_name(key_type_name) != ca->type) {
1793 fatal("CA key type %s doesn't match specified %s", 1793 fatal("CA key type %s doesn't match specified %s",
1794 sshkey_ssh_name(ca), key_type_name); 1794 sshkey_ssh_name(ca), key_type_name);
1795 }
1796 } else if (ca->type == KEY_RSA) {
1797 /* Default to a good signature algorithm */
1798 key_type_name = "rsa-sha2-512";
1795 } 1799 }
1796 ca_fp = sshkey_fingerprint(ca, fingerprint_hash, SSH_FP_DEFAULT); 1800 ca_fp = sshkey_fingerprint(ca, fingerprint_hash, SSH_FP_DEFAULT);
1797 1801