summaryrefslogtreecommitdiff
path: root/ssh-dss.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-12-22 01:43:59 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-12-22 01:43:59 +0000
commit46c162204b5a6f7471525c2f75cb2c607c88b83f (patch)
tree9041b006ab612c18bdb16b606601839a00ca5b2c /ssh-dss.c
parenta074feb65d6f1fcad02e80b751e2287fd6230b09 (diff)
One way to massive patch. <sigh> It compiles and works under Linux..
And I think I have all the bits right from the OpenBSD tree. 20001222 - Updated RCSID for pty.c - (bal) OpenBSD CVS Updates: - markus@cvs.openbsd.org 2000/12/21 15:10:16 [auth-rh-rsa.c hostfile.c hostfile.h sshconnect.c] print keyfile:line for changed hostkeys, for deraadt@, ok deraadt@ - markus@cvs.openbsd.org 2000/12/20 19:26:56 [authfile.c] allow ssh -i userkey for root - markus@cvs.openbsd.org 2000/12/20 19:37:21 [authfd.c authfd.h kex.c sshconnect2.c sshd.c uidswap.c uidswap.h] fix prototypes; from stevesk@pobox.com - markus@cvs.openbsd.org 2000/12/20 19:32:08 [sshd.c] init pointer to NULL; report from Jan.Ivan@cern.ch - markus@cvs.openbsd.org 2000/12/19 23:17:54 [auth-krb4.c auth-options.c auth-options.h auth-rhosts.c auth-rsa.c auth1.c auth2-skey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufaux.h buffer.c canohost.c channels.c clientloop.c compress.c crc32.c deattack.c getput.h hmac.c hmac.h hostfile.c kex.c kex.h key.c key.h log.c login.c match.c match.h mpaux.c mpaux.h packet.c packet.h radix.c readconf.c rsa.c scp.c servconf.c servconf.h serverloop.c session.c sftp-server.c ssh-agent.c ssh-dss.c ssh-dss.h ssh-keygen.c ssh-keyscan.c ssh-rsa.c ssh-rsa.h ssh.c ssh.h uuencode.c uuencode.h sshconnect1.c sshconnect2.c sshd.c tildexpand.c] replace 'unsigned bla' with 'u_bla' everywhere. also replace 'char unsigned' with u_char.
Diffstat (limited to 'ssh-dss.c')
-rw-r--r--ssh-dss.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/ssh-dss.c b/ssh-dss.c
index fea1fe2d5..96b1565d2 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-dss.c,v 1.1 2000/11/12 19:50:38 markus Exp $"); 26RCSID("$OpenBSD: ssh-dss.c,v 1.2 2000/12/19 23:17:58 markus Exp $");
27 27
28#include "ssh.h" 28#include "ssh.h"
29#include "xmalloc.h" 29#include "xmalloc.h"
@@ -44,18 +44,18 @@ RCSID("$OpenBSD: ssh-dss.c,v 1.1 2000/11/12 19:50:38 markus Exp $");
44int 44int
45ssh_dss_sign( 45ssh_dss_sign(
46 Key *key, 46 Key *key,
47 unsigned char **sigp, int *lenp, 47 u_char **sigp, int *lenp,
48 unsigned char *data, int datalen) 48 u_char *data, int datalen)
49{ 49{
50 unsigned char *digest; 50 u_char *digest;
51 unsigned char *ret; 51 u_char *ret;
52 DSA_SIG *sig; 52 DSA_SIG *sig;
53 EVP_MD *evp_md = EVP_sha1(); 53 EVP_MD *evp_md = EVP_sha1();
54 EVP_MD_CTX md; 54 EVP_MD_CTX md;
55 unsigned int rlen; 55 u_int rlen;
56 unsigned int slen; 56 u_int slen;
57 unsigned int len; 57 u_int len;
58 unsigned char sigblob[SIGBLOB_LEN]; 58 u_char sigblob[SIGBLOB_LEN];
59 Buffer b; 59 Buffer b;
60 60
61 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) { 61 if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) {
@@ -113,17 +113,17 @@ ssh_dss_sign(
113int 113int
114ssh_dss_verify( 114ssh_dss_verify(
115 Key *key, 115 Key *key,
116 unsigned char *signature, int signaturelen, 116 u_char *signature, int signaturelen,
117 unsigned char *data, int datalen) 117 u_char *data, int datalen)
118{ 118{
119 Buffer b; 119 Buffer b;
120 unsigned char *digest; 120 u_char *digest;
121 DSA_SIG *sig; 121 DSA_SIG *sig;
122 EVP_MD *evp_md = EVP_sha1(); 122 EVP_MD *evp_md = EVP_sha1();
123 EVP_MD_CTX md; 123 EVP_MD_CTX md;
124 unsigned char *sigblob; 124 u_char *sigblob;
125 char *txt; 125 char *txt;
126 unsigned int len, dlen; 126 u_int len, dlen;
127 int rlen; 127 int rlen;
128 int ret; 128 int ret;
129 129
@@ -159,7 +159,7 @@ ssh_dss_verify(
159 buffer_free(&b); 159 buffer_free(&b);
160 return -1; 160 return -1;
161 } 161 }
162 sigblob = (unsigned char *)buffer_get_string(&b, &len); 162 sigblob = (u_char *)buffer_get_string(&b, &len);
163 rlen = buffer_len(&b); 163 rlen = buffer_len(&b);
164 if(rlen != 0) { 164 if(rlen != 0) {
165 error("remaining bytes in signature %d", rlen); 165 error("remaining bytes in signature %d", rlen);