Пример #1
0
 def test_decode_garbage(self):
     """
     If decoding fails, `~txacme.util.decode_csr` raises
     `~josepy.errors.DeserializationError`.
     """
     with ExpectedException(DeserializationError):
         decode_csr(u'blah blah not a valid CSR')
Пример #2
0
 def test_decode_garbage(self):
     """
     If decoding fails, `~txacme.util.decode_csr` raises
     `~acme.jose.errors.DeserializationError`.
     """
     with ExpectedException(DeserializationError):
         decode_csr(u'blah blah not a valid CSR')
Пример #3
0
 def test_roundtrip(self, names):
     """
     The encoding roundtrips.
     """
     assume(len(names[0]) <= 64)
     csr = csr_for_names(names, RSA_KEY_512_RAW)
     self.assertThat(decode_csr(encode_csr(csr)), Equals(csr))
Пример #4
0
 def test_roundtrip(self, names):
     """
     The encoding roundtrips.
     """
     assume(len(names[0]) <= 64)
     csr = csr_for_names(names, RSA_KEY_512_RAW)
     self.assertThat(decode_csr(encode_csr(csr)), Equals(csr))