U
    *bÈ  ã                   @   sR   d dl mZmZmZmZ G dd„ deƒZG dd„ deeƒZG dd„ deeeƒZdS )	é    )ÚPluginÚRedHatPluginÚDebianPluginÚUbuntuPluginc                   @   s(   e Zd ZdZdZdZdZdZdd„ ZdS )	ÚOpenSSLzOpenSSL configurationÚopenssl)ZnetworkZsecurity)r   )z	openssl.*c                 C   s*   dddg}dd  |¡ }|  d|d¡ d S )NZinput_passwordZoutput_passwordZchallengePasswordz(?m)^(\s*#?\s*(%s).*=)(.*)ú|ú/etc/ssl/openssl.cnfz	\1 ******)ÚjoinZdo_file_sub)ÚselfZprotect_keysZregexp© r   ú</usr/lib/python3/dist-packages/sos/report/plugins/openssl.pyÚpostproc   s    ýýzOpenSSL.postprocN)	Ú__name__Ú
__module__Ú__qualname__Z
short_descZplugin_nameZprofilesZpackagesZverify_packagesr   r   r   r   r   r      s   r   c                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚRedHatOpenSSL)ú/etc/pki/tls/openssl.cnfc                    s   t t| ƒ ¡  |  d¡ d S )Nr   )Úsuperr   ÚsetupÚadd_copy_spec©r   ©Ú	__class__r   r   r   +   s    zRedHatOpenSSL.setup©r   r   r   Úfilesr   Ú__classcell__r   r   r   r   r   '   s   r   c                       s    e Zd ZdZ‡ fdd„Z‡  ZS )ÚDebianOpenSSL)r	   c                    s   t t| ƒ ¡  |  d¡ d S )Nr	   )r   r   r   r   r   r   r   r   r   4   s    zDebianOpenSSL.setupr   r   r   r   r   r   0   s   r   N)Zsos.report.pluginsr   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   	