def test_string(self): ckey = CryptoKey(self.valid_key) str = ckey.to_string() ckey2 = CryptoKey(str) assert ckey.get_keyid("p256dh") == ckey2.get_keyid("p256dh") assert ckey.get_label("p256ecdsa") is not None assert ckey.get_label("p256ecdsa") == ckey2.get_label("p256ecdsa")
def test_parse_lenient(self): ckey = CryptoKey(self.valid_key.replace('"', '')) str = ckey.to_string() ckey2 = CryptoKey(str) assert ckey.get_keyid("p256dh") == ckey2.get_keyid("p256dh") assert ckey.get_label("p256ecdsa") is not None assert ckey.get_label("p256ecdsa") == ckey2.get_label("p256ecdsa")
def test_string(self): ckey = CryptoKey(self.valid_key) str = ckey.to_string() ckey2 = CryptoKey(str) ok_(ckey.get_keyid("p256dh"), ckey2.get_keyid("p256dh")) ok_(ckey.get_label("p256ecdsa") is not None) ok_(ckey.get_label("p256ecdsa"), ckey2.get_label("p256ecdsa"))
def test_string(self): ckey = CryptoKey(self.valid_key) str = ckey.to_string() ckey2 = CryptoKey(str) ok_(ckey.get_keyid("p256dh"), ckey2.get_keyid("p256dh")) ok_(ckey.get_label("p256ecdsa") is not None) ok_(ckey.get_label("p256ecdsa"), ckey2.get_label("p256ecdsa"))
def test_parse_lenient(self): ckey = CryptoKey(self.valid_key.replace('"', '')) str = ckey.to_string() ckey2 = CryptoKey(str) ok_(ckey.get_keyid("p256dh"), ckey2.get_keyid("p256dh")) ok_(ckey.get_label("p256ecdsa") is not None) ok_(ckey.get_label("p256ecdsa"), ckey2.get_label("p256ecdsa"))