crypto: avoid bad prototype codegen from cython

(-Wstrict-prototypes, Cyton forgets a "void")
This commit is contained in:
Marian Beermann 2017-07-29 12:28:33 +02:00
parent 630e45b742
commit e57dd4bc9e
1 changed files with 8 additions and 8 deletions

View File

@ -222,8 +222,8 @@ cdef class AES256_CTR_BASE:
cdef unsigned char iv[16]
cdef long long blocks
@staticmethod
def requirements_check():
@classmethod
def requirements_check(cls):
if OPENSSL_VERSION_NUMBER < 0x10000000:
raise ValueError('AES CTR requires OpenSSL >= 1.0.0. Detected: OpenSSL %08x' % OPENSSL_VERSION_NUMBER)
@ -480,8 +480,8 @@ cdef class _AEAD_BASE:
cdef unsigned char iv[12]
cdef long long blocks
@staticmethod
def requirements_check():
@classmethod
def requirements_check(cls):
"""check whether library requirements for this ciphersuite are satisfied"""
raise NotImplemented # override / implement in child class
@ -671,8 +671,8 @@ cdef class _CHACHA_BASE(_AEAD_BASE):
cdef class AES256_OCB(_AES_BASE):
@staticmethod
def requirements_check():
@classmethod
def requirements_check(cls):
if OPENSSL_VERSION_NUMBER < 0x10100000:
raise ValueError('AES OCB requires OpenSSL >= 1.1.0. Detected: OpenSSL %08x' % OPENSSL_VERSION_NUMBER)
@ -683,8 +683,8 @@ cdef class AES256_OCB(_AES_BASE):
cdef class CHACHA20_POLY1305(_CHACHA_BASE):
@staticmethod
def requirements_check():
@classmethod
def requirements_check(cls):
if OPENSSL_VERSION_NUMBER < 0x10100000:
raise ValueError('CHACHA20-POLY1305 requires OpenSSL >= 1.1.0. Detected: OpenSSL %08x' % OPENSSL_VERSION_NUMBER)