]> de.git.xonotic.org Git - xonotic/d0_blind_id.git/blobdiff - d0_bignum-openssl.c
mark things that need to be made threadsafe
[xonotic/d0_blind_id.git] / d0_bignum-openssl.c
index 1e103a4c725c8ca75dcf67e052544cdfdb153dd4..1d92c32898763bfd91511f496e6da1ae179ae74b 100644 (file)
@@ -57,8 +57,8 @@ struct d0_bignum_s
        BIGNUM z;
 };
 
-static d0_bignum_t temp;
-static BN_CTX *ctx;
+static d0_bignum_t temp; // FIXME make threadsafe
+static BN_CTX *ctx; // FIXME make threadsafe
 
 #include <time.h>
 #include <stdio.h>
@@ -79,7 +79,7 @@ void d0_bignum_SHUTDOWN(void)
 
 D0_BOOL d0_iobuf_write_bignum(d0_iobuf_t *buf, const d0_bignum_t *bignum)
 {
-       static unsigned char numbuf[65536];
+       static unsigned char numbuf[65536]; // FIXME make threadsafe
        size_t count = 0;
        numbuf[0] = BN_is_zero(&bignum->z) ? 0 : BN_is_negative(&bignum->z) ? 3 : 1;
        if((numbuf[0] & 3) != 0) // nonzero
@@ -94,7 +94,7 @@ D0_BOOL d0_iobuf_write_bignum(d0_iobuf_t *buf, const d0_bignum_t *bignum)
 
 d0_bignum_t *d0_iobuf_read_bignum(d0_iobuf_t *buf, d0_bignum_t *bignum)
 {
-       static unsigned char numbuf[65536];
+       static unsigned char numbuf[65536]; // FIXME make threadsafe
        size_t count = sizeof(numbuf);
        if(!d0_iobuf_read_packet(buf, numbuf, &count))
                return NULL;