3 ܓi @s.ddlmZmZmZmZGdddeeZdS))PluginIndependentPlugin SoSPredicate PluginOptc@s@eZdZdZdZdZedddd gZdZdZ d d Z ddZ dS) LibreswanzLibreswan IPsec libreswannetworksecurity openshiftz ipsec-barfFzcollect ipsec barf output)defaultZdesc/etc/ipsec.confopenswancCst|jdddg|jddddgt|dd gd d id }|jd dg|d|jdr^|jd|jddddgdS)Nz/etc/ipsec.confz /etc/ipsec.dz/proc/net/xfrm_statz ipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.dZ xfrm_userZ xfrm_algokmodsall)rZrequiredzip xfrm policyz ip xfrm state)Zpredz ipsec-barfz ipsec barfz/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.6/libreswan.pysetups,    zLibreswan.setupcCs.d}|jd|d|jdr*|jd|ddS)Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)statez \1\2********z ipsec-barfZbarf)Zdo_cmd_output_subr)rZxfrm_state_regexprrrpostproc@s  zLibreswan.postprocN)rr r )r )rr ) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesrZ option_listfilesZpackagesrrrrrrrs "rN)Zsos.report.pluginsrrrrrrrrr s