
    -_g	                     4    d dl mZmZmZmZ  G d dee      Zy)    )PluginIndependentPluginSoSPredicate	PluginOptc                   D    e Zd ZdZdZdZ eddd      gZdZd	Z	d
 Z
d Zy)	LibreswanzLibreswan IPsec	libreswan)networksecurity	openshift
ipsec-barfFzcollect ipsec barf output)defaultdesc)/etc/ipsec.conf)r	   openswanc                    | j                  g d       | j                  g d       t        | ddgddi      }| j                  dd	g|
       | j                  d      r| j                  d       | j	                  g d       y )N)r   z/etc/ipsec.dz/proc/net/xfrm_stat)zipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.d	xfrm_user	xfrm_algokmodsall)r   requiredzip xfrm policyzip xfrm state)predr   z
ipsec barf)z/etc/ipsec.secretsz/etc/ipsec.secrets.dz/etc/ipsec.d/*.dbz/etc/ipsec.d/*.secrets)add_copy_specadd_cmd_outputr   
get_optionadd_forbidden_path)self	xfrm_preds     >/usr/lib/python3/dist-packages/sos/report/plugins/libreswan.pysetupzLibreswan.setup   s     
 	 	 
 	 !k;-G+2E*:<	
  	 	
 ??<(- !
 	    c                 x    d}| j                  d|d       | j                  d      r| j                  d|d       y y )Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)statez\1\2********r   barf)do_cmd_output_subr   )r   xfrm_state_regexps     r   postproczLibreswan.postproc@   sI    5w(9.	0 ??<(""6+<#24 )r!   N)__name__
__module____qualname__
short_descplugin_nameprofilesr   option_listfilespackagesr    r'    r!   r   r   r      s>    "JK3H,2	4K
 !E(H D4r!   r   N)sos.report.pluginsr   r   r   r   r   r1   r!   r   <module>r3      s   + +;4) ;4r!   