summaryrefslogtreecommitdiffstats
path: root/sshkey.h
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-12-18 03:25:15 +0100
committerDamien Miller <djm@mindrot.org>2017-12-19 05:21:37 +0100
commit04c7e28f83062dc42f2380d1bb3a6bf0190852c0 (patch)
treebc2c59d39a33aba84e0576039474668ada2546d2 /sshkey.h
parentupstream commit (diff)
downloadopenssh-04c7e28f83062dc42f2380d1bb3a6bf0190852c0.tar.xz
openssh-04c7e28f83062dc42f2380d1bb3a6bf0190852c0.zip
upstream commit
pass negotiated signing algorithm though to sshkey_verify() and check that the negotiated algorithm matches the type in the signature (only matters for RSA SHA1/SHA2 sigs). ok markus@ OpenBSD-Commit-ID: 735fb15bf4adc060d3bee9d047a4bcaaa81b1af9
Diffstat (limited to 'sshkey.h')
-rw-r--r--sshkey.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sshkey.h b/sshkey.h
index b5346a92d..7efa16ff9 100644
--- a/sshkey.h
+++ b/sshkey.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.h,v 1.22 2017/12/18 02:22:29 djm Exp $ */
+/* $OpenBSD: sshkey.h,v 1.23 2017/12/18 02:25:15 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -178,7 +178,7 @@ int sshkey_sigtype(const u_char *, size_t, char **);
int sshkey_sign(const struct sshkey *, u_char **, size_t *,
const u_char *, size_t, const char *, u_int);
int sshkey_verify(const struct sshkey *, const u_char *, size_t,
- const u_char *, size_t, u_int);
+ const u_char *, size_t, const char *, u_int);
/* for debug */
void sshkey_dump_ec_point(const EC_GROUP *, const EC_POINT *);
@@ -205,7 +205,8 @@ int ssh_rsa_sign(const struct sshkey *key,
u_char **sigp, size_t *lenp, const u_char *data, size_t datalen,
const char *ident);
int ssh_rsa_verify(const struct sshkey *key,
- const u_char *sig, size_t siglen, const u_char *data, size_t datalen);
+ const u_char *sig, size_t siglen, const u_char *data, size_t datalen,
+ const char *alg);
int ssh_dss_sign(const struct sshkey *key, u_char **sigp, size_t *lenp,
const u_char *data, size_t datalen, u_int compat);
int ssh_dss_verify(const struct sshkey *key,