def test_create_ca_utf8_higher_codepoint(self): ca_path = self.create_tempdir() ca = CA(ca_path=ca_path, openssl_path=self._openssl_path) res_ca = ca.initialize( dn=dict( cn='Ragnarr Lođbrok', c='no', st='Kattegatt', ), newkey='rsa:512', ) self.assertTrue(res_ca.get('success')) info = ca.get_info() cn = info['rootca']['subject']['CN'] self.assertEqual(cn, 'Ragnarr Lođbrok')
def test_create_ca_utf8(self): ca_path = self.create_tempdir() ca = CA(ca_path=ca_path, openssl_path=self._openssl_path) res_ca = ca.initialize( dn=dict( cn='example.com', c='se', st='Östergötlands Län', ), newkey='rsa:512', ) self.assertTrue(res_ca.get('success')) info = ca.get_info() print(info) st = info['rootca']['subject']['ST'] self.assertEqual(st, 'Östergötlands Län')