random_stir() is unused outside this file. Make it static.
[u/mdw/putty] / sshrsa.c
index 92160d4..92c1ac9 100644 (file)
--- a/sshrsa.c
+++ b/sshrsa.c
@@ -11,6 +11,7 @@
 #include <assert.h>
 
 #include "ssh.h"
+#include "misc.h"
 
 #define GET_32BIT(cp) \
     (((unsigned long)(unsigned char)(cp)[0] << 24) | \
@@ -251,7 +252,6 @@ unsigned char *rsa_public_blob(struct RSAKey *key, int *len)
 int rsa_public_blob_len(void *data)
 {
     unsigned char *p = (unsigned char *)data;
-    int ret;
 
     p += 4;                           /* length word */
     p += ssh1_read_bignum(p, NULL);    /* exponent */
@@ -299,7 +299,7 @@ static Bignum getmp(char **data, int *datalen)
     getstring(data, datalen, &p, &length);
     if (!p)
        return NULL;
-    b = bignum_from_bytes(p, length);
+    b = bignum_from_bytes((unsigned char *)p, length);
     return b;
 }
 
@@ -510,7 +510,7 @@ static char *rsa2_fingerprint(void *key)
     int numlen, i;
 
     MD5Init(&md5c);
-    MD5Update(&md5c, "\0\0\0\7ssh-rsa", 11);
+    MD5Update(&md5c, (unsigned char *)"\0\0\0\7ssh-rsa", 11);
 
 #define ADD_BIGNUM(bignum) \
     numlen = (bignum_bitcount(bignum)+8)/8; \
@@ -559,7 +559,7 @@ static char *rsa2_fingerprint(void *key)
  *    iso(1) identified-organization(3) oiw(14) secsig(3)
  *    algorithms(2) 26 }
  */
-static unsigned char asn1_weird_stuff[] = {
+static const unsigned char asn1_weird_stuff[] = {
     0x00, 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B,
     0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, 0x04, 0x14,
 };