[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST RFC 05/16] TestSupport: Adapt target_https_mitm_proxy_setup to CentOS
The location for new certificates is different, and update-ca-certificates is Debian specific. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- Osstest/TestSupport.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index b0e21bf..2b56c26 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2845,9 +2845,18 @@ sub target_https_mitm_proxy_setup ($) { my ($ho) = @_; my $cert = $c{HttpsProxyMITMCert}; return unless length $cert; + my $dest; + my $update_ca_cmd; + if ($ho->{OS} eq "centos" ) { + $dest = '/etc/pki/ca-trust/source/anchors'; + $update_ca_cmd = 'update-ca-trust extract'; + } else { + $dest = '/usr/local/share/ca-certificates'; + $update_ca_cmd = 'update-ca-certificates'; + } target_putfilecontents_root_stash($ho,30,$cert, - '/usr/local/share/ca-certificates/osstest.crt'); - target_cmd_root($ho, 'update-ca-certificates', 300); + $dest.'/osstest.crt'); + target_cmd_root($ho, $update_ca_cmd, 300); } sub sha256file ($;$) { -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |