a >h @s.ddlmZmZmZmZGdddeeZdS))PluginIndependentPlugin SoSPredicate PluginOptc@s@eZdZdZdZdZeddddgZdZd Z d d Z d d Z dS) LibreswanzLibreswan IPsec libreswan)networkZsecurityZ openshift ipsec-barfFzcollect ipsec barf output)defaultZdesc)/etc/ipsec.conf)rZopenswancCsj|gd|gdt|ddgddid}|jdd g|d |d rX|d |gd dS)N)r z /etc/ipsec.dz/proc/net/xfrm_stat)z ipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.dZ xfrm_userZ xfrm_algokmodsall)r requiredzip xfrm policyz ip xfrm state)Zpredr z ipsec barf)z/etc/ipsec.secretsz/etc/ipsec.secrets.dz/etc/ipsec.d/*.dbz/etc/ipsec.d/*.secrets)Z add_copy_specZadd_cmd_outputr get_optionZadd_forbidden_path)selfZ xfrm_predr@/usr/lib/python3.9/site-packages/sos/report/plugins/libreswan.pysetups   zLibreswan.setupcCs.d}|d|d|dr*|d|ddS)Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)statez \1\2********r Zbarf)Zdo_cmd_output_subr)rZxfrm_state_regexprrrpostproc@s zLibreswan.postprocN) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesrZ option_listfilesZpackagesrrrrrrrs"rN)Zsos.report.pluginsrrrrrrrrr s