aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptography/x509/base.py')
-rw-r--r--src/cryptography/x509/base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cryptography/x509/base.py b/src/cryptography/x509/base.py
index 63c2e3c6..dc7eee94 100644
--- a/src/cryptography/x509/base.py
+++ b/src/cryptography/x509/base.py
@@ -12,7 +12,7 @@ from enum import Enum
import six
from cryptography import utils
-from cryptography.hazmat.primitives.asymmetric import dsa, ec, rsa
+from cryptography.hazmat.primitives.asymmetric import dsa, ec, ed25519, rsa
from cryptography.x509.extensions import Extension, ExtensionType
from cryptography.x509.name import Name
@@ -474,9 +474,10 @@ class CertificateBuilder(object):
Sets the requestor's public key (as found in the signing request).
"""
if not isinstance(key, (dsa.DSAPublicKey, rsa.RSAPublicKey,
- ec.EllipticCurvePublicKey)):
+ ec.EllipticCurvePublicKey,
+ ed25519.Ed25519PublicKey)):
raise TypeError('Expecting one of DSAPublicKey, RSAPublicKey,'
- ' or EllipticCurvePublicKey.')
+ ' EllipticCurvePublicKey, or Ed25519PublicKey.')
if self._public_key is not None:
raise ValueError('The public key may only be set once.')
return CertificateBuilder(