#NEWLINE# def get_friendly_name( cert , password ) : #NEWLINE# #INDENT# "\n    Get the friendly name of the given certificate\n\n    cert\n        The certificate to install\n\n    password\n        The password for the certificate being installed formatted in the way\n        described for openssl command in the PASS PHRASE ARGUMENTS section\n\n        Note: The password given here will show up as plaintext in the returned job\n        info.\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' keychain.get_friendly_name /tmp/test.p12 test123\n    " #NEWLINE# cmd = 'openssl pkcs12 -in {0} -passin pass:{1} -info -nodes -nokeys 2> /dev/null | grep friendlyName:' . format ( _quote ( cert ) , _quote ( password ) ) #NEWLINE# out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = True ) #NEWLINE# return out . replace ( 'friendlyName: ' , '' ) . strip ( )