o
G%@i @ s. d dl mZmZmZmZ G dd deeZdS ) )PluginIndependentPluginSoSPredicate PluginOptc @ s@ e Zd ZdZdZdZeddddgZdZd Z d
d Z
dd
ZdS ) LibreswanzLibreswan IPsec libreswan)networksecurity openshift
ipsec-barfFzcollect ipsec barf output)defaultdesc)/etc/ipsec.conf)r openswanc C sj | g d | g d t| ddgddid}| jdd g|d
| dr,| d | g d
d S )N)r z/etc/ipsec.dz/proc/net/xfrm_stat)zipsec verifyzipsec whack --statuszipsec whack --listallzcertutil -L -d sql:/etc/ipsec.d xfrm_user xfrm_algokmodsall)r requiredzip 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_specadd_cmd_outputr
get_optionadd_forbidden_path)self xfrm_pred r >/usr/lib/python3/dist-packages/sos/report/plugins/libreswan.pysetup s
zLibreswan.setupc C s2 d}| d|d | dr| d|d d S d S )Nz/(aead|auth|auth-trunc|enc)(\s.*\s)(0x[0-9a-f]+)statez\1\2********r barf)do_cmd_output_subr )r xfrm_state_regexpr r r postproc@ s
zLibreswan.postprocN)__name__
__module____qualname__
short_descplugin_nameprofilesr option_listfilespackagesr r# r r r r r s "r N)sos.report.pluginsr r r r r r r r r