%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/win_certutil.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z e j e � Z d Z d � Z d � Z d � Z d d � Z d d � Z d S( u� This module allows you to install certificates into the windows certificate manager. .. code-block:: bash salt '*' certutil.add_store salt://cert.cer "TrustedPublisher" i ( t absolute_importt unicode_literalst print_functionNu certutilc C@ s t j j j � r t St S( u Only work on Windows ( t saltt utilst platformt is_windowst __virtualname__t False( ( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt __virtual__ s c C@ sY d j | � } t d | � } t j d | � } | d k rQ | j � d j � Sd Sd S( u� Get the serial number of a certificate file cert_file The certificate file to find the serial for CLI Example: .. code-block:: bash salt '*' certutil.get_cert_serial <certificate name> u certutil.exe -silent -verify {0}u cmd.runu :\s*(\w*)\r\n\r\ni N( t formatt __salt__t ret searcht Nonet groupst strip( t cert_filet cmdt outt matches( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt get_cert_serial s c C@ s5 d j | � } t d | � } t j d | � } | S( u� Get all of the certificate serials in the specified store store The store to get all the certificate serials from CLI Example: .. code-block:: bash salt '*' certutil.get_stored_cert_serials <store> u certutil.exe -store {0}u cmd.runu ={16}\r\n.*:\s*(\w*)\r\n( R R R t findall( t storeR R R ( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt get_stored_cert_serials7 s u basec C@ s3 t d | | � } d j | | � } t d | � S( u� Add the given cert into the given Certificate Store source The source certificate file this can be in the form salt://path/to/file store The certificate store to add the certificate to saltenv The salt environment to use this is ignored if the path is local CLI Example: .. code-block:: bash salt '*' certutil.add_store salt://cert.cer TrustedPublisher u cp.cache_fileu certutil.exe -addstore {0} {1}u cmd.run( R R ( t sourceR t saltenvR R ( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt add_storeK s c C@ s? t d | | � } t | � } d j | | � } t d | � S( u� Delete the given cert into the given Certificate Store source The source certificate file this can be in the form salt://path/to/file store The certificate store to delete the certificate from saltenv The salt environment to use this is ignored if the path is local CLI Example: .. code-block:: bash salt '*' certutil.del_store salt://cert.cer TrustedPublisher u cp.cache_fileu certutil.exe -delstore {0} {1}u cmd.run( R R R ( R R R R t serialR ( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt del_storee s ( t __doc__t __future__R R R R t loggingt salt.utils.platformR t getLoggert __name__t logR R R R R R ( ( ( s= /usr/lib/python2.7/site-packages/salt/modules/win_certutil.pyt <module> s