'The *friendlyName* of a PKCS12 can be set and retrieved via
:py:obj:`PKCS12.get_friendlyname` and :py:obj:`PKCS12_set_friendlyname`, and a
:py:obj:`PKCS12` with a friendly name set can be dumped with :py:obj:`PKCS12.export`.'

def test_friendly_name(self):

    passwd = 'Dogmeat[]{}!@#$%^&*()~`?/.,<>-_+=";:'
    p12 = self.gen_pkcs12(server_cert_pem, server_key_pem, root_cert_pem)
    for friendly_name in [b('Serverlicious'), None, b('###')]:
        p12.set_friendlyname(friendly_name)
        self.assertEqual(p12.get_friendlyname(), friendly_name)
        dumped_p12 = p12.export(passphrase=passwd, iter=2, maciter=3)
        reloaded_p12 = load_pkcs12(dumped_p12, passwd)
        self.assertEqual(p12.get_friendlyname(), reloaded_p12.get_friendlyname())
        self.check_recovery(dumped_p12, key=server_key_pem, cert=server_cert_pem, ca=root_cert_pem, passwd=passwd)
