3
ܓi @ s. d dl mZmZmZmZ G dd deeZdS ) )PluginIndependentPluginSoSPredicate PluginOptc @ s@ e Zd ZdZdZdZedddd gZdZdZ dd
Z
dd ZdS ) LibreswanzLibreswan IPsec libreswannetworksecurity openshiftz
ipsec-barfFzcollect ipsec barf output)defaultZdesc/etc/ipsec.confopenswanc C st | j dddg | jddddg t| dd gd
did}| jd
dg|d | jdr^| jd | jddddg d S )Nz/etc/ipsec.confz/etc/ipsec.dz/proc/net/xfrm_statzipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.dZ xfrm_userZ xfrm_algokmodsall)r Zrequiredzip 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_pred r /usr/lib/python3.6/libreswan.pysetup s,
zLibreswan.setupc C s. d}| j d|d | jdr*| j d|d d S )Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)statez\1\2********z
ipsec-barfZbarf)Zdo_cmd_output_subr )r Zxfrm_state_regexpr r r postproc@ s
zLibreswan.postprocN)r r r
)r )r r
)__name__
__module____qualname__Z
short_descZplugin_nameZprofilesr Zoption_listfilesZpackagesr r r r r r r s
"r N)Zsos.report.pluginsr r r r r r r r r