summaryrefslogtreecommitdiff
path: root/ssh-dss.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-dss.c')
-rw-r--r--ssh-dss.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/ssh-dss.c b/ssh-dss.c
index 51a06e98f..449f493b4 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-dss.c,v 1.24 2006/11/06 21:25:28 markus Exp $ */ 1/* $OpenBSD: ssh-dss.c,v 1.25 2010/02/26 20:29:54 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -53,7 +53,9 @@ ssh_dss_sign(const Key *key, u_char **sigp, u_int *lenp,
53 u_int rlen, slen, len, dlen; 53 u_int rlen, slen, len, dlen;
54 Buffer b; 54 Buffer b;
55 55
56 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { 56 if (key == NULL ||
57 (key->type != KEY_DSA && key->type != KEY_DSA_CERT) ||
58 key->dsa == NULL) {
57 error("ssh_dss_sign: no DSA key"); 59 error("ssh_dss_sign: no DSA key");
58 return -1; 60 return -1;
59 } 61 }
@@ -116,7 +118,9 @@ ssh_dss_verify(const Key *key, const u_char *signature, u_int signaturelen,
116 int rlen, ret; 118 int rlen, ret;
117 Buffer b; 119 Buffer b;
118 120
119 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { 121 if (key == NULL ||
122 (key->type != KEY_DSA && key->type != KEY_DSA_CERT) ||
123 key->dsa == NULL) {
120 error("ssh_dss_verify: no DSA key"); 124 error("ssh_dss_verify: no DSA key");
121 return -1; 125 return -1;
122 } 126 }