def test_read_private_key_unicode(self):
     self.assertRaises(exceptions.NeedsPassphrase,
                       cert_parser._read_privatekey,
                       ENCRYPTED_PKCS8_CRT_KEY)
     cert_parser._read_privatekey(
         ENCRYPTED_PKCS8_CRT_KEY,
         passphrase=u'{0}'.format(ENCRYPTED_PKCS8_CRT_KEY_PASSPHRASE))
 def test_read_private_key(self):
     self.assertRaises(exceptions.NeedsPassphrase,
                       cert_parser._read_privatekey,
                       ENCRYPTED_PKCS8_CRT_KEY)
     cert_parser._read_privatekey(
         str(ENCRYPTED_PKCS8_CRT_KEY),
         passphrase=ENCRYPTED_PKCS8_CRT_KEY_PASSPHRASE)
 def test_read_private_key(self):
     self.assertRaises(exceptions.NeedsPassphrase,
                       cert_parser._read_privatekey,
                       ENCRYPTED_PKCS8_CRT_KEY)
     cert_parser._read_privatekey(
         str(ENCRYPTED_PKCS8_CRT_KEY),
         passphrase=ENCRYPTED_PKCS8_CRT_KEY_PASSPHRASE)
Beispiel #4
0
 def test_read_private_key_unicode(self):
     self.assertRaises(exceptions.NeedsPassphrase,
                       cert_parser._read_privatekey,
                       ENCRYPTED_PKCS8_CRT_KEY)
     epkey = cert_parser._read_privatekey(
         ENCRYPTED_PKCS8_CRT_KEY,
         passphrase=u'{0}'.format(ENCRYPTED_PKCS8_CRT_KEY_PASSPHRASE))
     self.assertTrue(epkey.check())
 def test_read_private_key(self):
     self.assertRaises(exceptions.NeedsPassphrase,
                       cert_parser._read_privatekey,
                       ENCRYPTED_PKCS8_CRT_KEY)
     epkey = cert_parser._read_privatekey(
         ENCRYPTED_PKCS8_CRT_KEY,
         passphrase=ENCRYPTED_PKCS8_CRT_KEY_PASSPHRASE)
     self.assertTrue(epkey.check())