Browse Source

fix for openssl 1.1

pull/1474/head
orignal 5 years ago
parent
commit
f498fabd27
  1. 3
      tests/test-x25519.cpp

3
tests/test-x25519.cpp

@ -27,10 +27,13 @@ uint8_t p[32] =
int main () int main ()
{ {
#if !OPENSSL_X25519
// we test it for openssl < 1.1.0
uint8_t buf[32]; uint8_t buf[32];
BN_CTX * ctx = BN_CTX_new (); BN_CTX * ctx = BN_CTX_new ();
i2p::crypto::GetEd25519 ()->ScalarMul (u, k, buf, ctx); i2p::crypto::GetEd25519 ()->ScalarMul (u, k, buf, ctx);
BN_CTX_free (ctx); BN_CTX_free (ctx);
assert(memcmp (buf, p, 32) == 0); assert(memcmp (buf, p, 32) == 0);
#endif
} }

Loading…
Cancel
Save