def get_pub_str(self, name='master'):
        '''
        Return the string representation of a public key
        in the pki-directory
        '''
        path = os.path.join(self.opts['pki_dir'],
                            name + '.pub')
        if not os.path.isfile(path):
            key = self.__get_keys()
            if HAS_M2:
                key.save_pub_key(path)
            else:
                with salt.utils.files.fopen(path, 'wb+') as wfh:
                    wfh.write(key.publickey().exportKey('PEM'))
        with salt.utils.files.fopen(path) as rfh:
            return rfh.read()
def get_pub_str ( self , name = 'master' ) : path = os . path . join ( self . opts [ 'pki_dir' ] , name + '.pub' ) if not os . path . isfile ( path ) : key = self . __get_keys ( ) if HAS_M2 : key . save_pub_key ( path ) else : with salt . utils . files . fopen ( path , 'wb+' ) as wfh : wfh . write ( key . publickey ( ) . exportKey ( 'PEM' ) ) with salt . utils . files . fopen ( path ) as rfh : return rfh . read ( )
Return the string representation of a public key
        in the pki-directory