wget: attempt to negotiate encrypted data ftps stream ("PROT P")
[oweals/busybox.git] / networking / tls_pstm_montgomery_reduce.c
index c231c4ddf8f06e4d17031550d20b8df11c61a199..3391755e16edf87880c7c8a0287c5a213fae5874 100644 (file)
@@ -5,6 +5,10 @@
  */
 #include "tls.h"
 
+/* The file is taken almost verbatim from matrixssl-3-7-2b-open/crypto/math/.
+ * Changes are flagged with //bbox
+ */
+
 /**
  *     @file    pstm_montgomery_reduce.c
  *     @version 33ef80f (HEAD, tag: MATRIXSSL-3-7-2-OPEN, tag: MATRIXSSL-3-7-2-COMM, origin/master, origin/HEAD, master)
@@ -39,7 +43,7 @@
  */
 /******************************************************************************/
 
-///bbox
+//bbox
 //#include "../cryptoApi.h"
 #ifndef DISABLE_PSTM
 
@@ -341,7 +345,7 @@ int32 pstm_montgomery_reduce(psPool_t *pool, pstm_int *a, pstm_int *m,
 {
        pstm_digit      *c, *_c, *tmpm, mu;
        int32           oldused, x, y;
-       int16           pa;
+       int             pa; //bbox: was int16
 
        pa = m->used;
        if (pa > a->alloc) {
@@ -353,7 +357,7 @@ int32 pstm_montgomery_reduce(psPool_t *pool, pstm_int *a, pstm_int *m,
                c = paD;
                memset(c, 0x0, paDlen);
        } else {
-               c = xzalloc(2*pa+1);
+               c = xzalloc(2*pa+1);//bbox
        }
        /* copy the input */
        oldused = a->used;