=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-rsa.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- src/usr.bin/ssh/ssh-rsa.c 2016/04/21 06:08:02 1.59 +++ src/usr.bin/ssh/ssh-rsa.c 2016/09/12 23:39:34 1.60 @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-rsa.c,v 1.59 2016/04/21 06:08:02 djm Exp $ */ +/* $OpenBSD: ssh-rsa.c,v 1.60 2016/09/12 23:39:34 djm Exp $ */ /* * Copyright (c) 2000, 2003 Markus Friedl * @@ -48,7 +48,8 @@ static int rsa_hash_alg_from_ident(const char *ident) { - if (strcmp(ident, "ssh-rsa") == 0) + if (strcmp(ident, "ssh-rsa") == 0 || + strcmp(ident, "ssh-rsa-cert-v01@openssh.com") == 0) return SSH_DIGEST_SHA1; if (strcmp(ident, "rsa-sha2-256") == 0) return SSH_DIGEST_SHA256; @@ -88,8 +89,7 @@ if (sigp != NULL) *sigp = NULL; - if (alg_ident == NULL || strlen(alg_ident) == 0 || - strncmp(alg_ident, "ssh-rsa-cert", strlen("ssh-rsa-cert")) == 0) + if (alg_ident == NULL || strlen(alg_ident) == 0) hash_alg = SSH_DIGEST_SHA1; else hash_alg = rsa_hash_alg_from_ident(alg_ident);