Refactoring crypto base changes #1806
|
@ -5,7 +5,10 @@ import os
|
||||||
import unittest
|
import unittest
|
||||||
from hashlib import sha256
|
from hashlib import sha256
|
||||||
|
|
||||||
from pybitmessage.pyelliptic import ECCBlind, ECCBlindChain, OpenSSL
|
try:
|
||||||
|
from pyelliptic import ECCBlind, ECCBlindChain, OpenSSL
|
||||||
|
except ImportError:
|
||||||
|
from pybitmessage.pyelliptic import ECCBlind, ECCBlindChain, OpenSSL
|
||||||
|
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
|
|
|
@ -3,7 +3,10 @@ Test if OpenSSL is working correctly
|
||||||
"""
|
"""
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from pybitmessage.pyelliptic.openssl import OpenSSL
|
try:
|
||||||
|
from pyelliptic.openssl import OpenSSL
|
||||||
|
except ImportError:
|
||||||
|
from pybitmessage.pyelliptic import OpenSSL
|
||||||
|
|
||||||
try:
|
try:
|
||||||
OpenSSL.BN_bn2binpad
|
OpenSSL.BN_bn2binpad
|
||||||
|
@ -33,7 +36,7 @@ class TestOpenSSL(unittest.TestCase):
|
||||||
|
|
||||||
@unittest.skipUnless(have_pad, 'Skipping OpenSSL pad test')
|
@unittest.skipUnless(have_pad, 'Skipping OpenSSL pad test')
|
||||||
def test_padding(self):
|
def test_padding(self):
|
||||||
"""Test an alternatie implementation of bn2binpad"""
|
"""Test an alternative implementation of bn2binpad"""
|
||||||
|
|
||||||
ctx = OpenSSL.BN_CTX_new()
|
ctx = OpenSSL.BN_CTX_new()
|
||||||
a = OpenSSL.BN_new()
|
a = OpenSSL.BN_new()
|
Reference in New Issue
Block a user