Add X509Name.der
diff --git a/test/test_crypto.py b/test/test_crypto.py
index 3ee0392..99a62c3 100644
--- a/test/test_crypto.py
+++ b/test/test_crypto.py
@@ -279,6 +279,17 @@
self.assertNotEqual(a.hash(), b.hash())
+ def test_der(self):
+ """
+ L{X509Name.der} returns the DER encoded form of the name.
+ """
+ a = self._x509name(CN="foo", C="US")
+ self.assertEqual(
+ a.der(),
+ '0\x1b1\x0b0\t\x06\x03U\x04\x06\x13\x02US'
+ '1\x0c0\n\x06\x03U\x04\x03\x13\x03foo')
+
+
class _PKeyInteractionTestsMixin:
"""