aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptography/x509')
-rw-r--r--src/cryptography/x509/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptography/x509/base.py b/src/cryptography/x509/base.py
index 2c96c5bc..45b603f0 100644
--- a/src/cryptography/x509/base.py
+++ b/src/cryptography/x509/base.py
@@ -469,7 +469,7 @@ class CertificateBuilder(object):
# ASN.1 integers are always signed, so most significant bit must be
# zero.
- if utils.bit_length(number) >= 160: # As defined in RFC 5280
+ if number.bit_length() >= 160: # As defined in RFC 5280
raise ValueError('The serial number should not be more than 159 '
'bits.')
return CertificateBuilder(
@@ -686,7 +686,7 @@ class RevokedCertificateBuilder(object):
# ASN.1 integers are always signed, so most significant bit must be
# zero.
- if utils.bit_length(number) >= 160: # As defined in RFC 5280
+ if number.bit_length() >= 160: # As defined in RFC 5280
raise ValueError('The serial number should not be more than 159 '
'bits.')
return RevokedCertificateBuilder(