]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshbn.c
Diffie-Hellman key exchange now uses a dynamically allocated context.
[PuTTY.git] / sshbn.c
diff --git a/sshbn.c b/sshbn.c
index 40f9560ff5f6dcb07e81768097dc4fc9a2bc102d..8246e25d35e5620b62d28d46fcdad7772d536519 100644 (file)
--- a/sshbn.c
+++ b/sshbn.c
@@ -482,7 +482,7 @@ void decbn(Bignum bn)
     bn[i]--;
 }
 
-Bignum bignum_from_bytes(unsigned char *data, int nbytes)
+Bignum bignum_from_bytes(const unsigned char *data, int nbytes)
 {
     Bignum result;
     int w, i;
@@ -509,9 +509,9 @@ Bignum bignum_from_bytes(unsigned char *data, int nbytes)
  * Read an ssh1-format bignum from a data buffer. Return the number
  * of bytes consumed.
  */
-int ssh1_read_bignum(unsigned char *data, Bignum * result)
+int ssh1_read_bignum(const unsigned char *data, Bignum * result)
 {
-    unsigned char *p = data;
+    const unsigned char *p = data;
     int i;
     int w, b;