File tree Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Expand file tree Collapse file tree 5 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ let c_rehash = "/usr/bin/c_rehash"
2828let pem_certificate_header = " -----BEGIN CERTIFICATE-----"
2929let pem_certificate_footer = " -----END CERTIFICATE-----"
3030
31+ let certificate_path = " /etc/stunnel/certs"
32+
3133let library_path is_cert =
32- if is_cert then Stunnel. certificate_path else Stunnel. crl_path
34+ if is_cert then certificate_path else Stunnel. crl_path
3335
3436let library_filename is_cert name =
3537 Filename. concat (library_path is_cert) name
@@ -45,6 +47,8 @@ let rehash () =
4547 rehash' (library_path true );
4648 rehash' (library_path false )
4749
50+ let update_ca_bundle () = ignore (execute_command_get_output " /opt/xensource/bin/update-ca-bundle.sh" [] )
51+
4852let get_type is_cert =
4953 if is_cert then " certificate" else " CRL"
5054
@@ -130,7 +134,7 @@ let host_install is_cert ~name ~cert =
130134 mkdir_cert_path is_cert;
131135 write_string_to_file filename cert;
132136 Unix. chmod filename (cert_perms is_cert);
133- rehash ()
137+ update_ca_bundle ()
134138 with
135139 | e ->
136140 warn " Exception installing %s %s: %s" (get_type is_cert) name
@@ -146,7 +150,7 @@ let host_uninstall is_cert ~name =
146150 debug " Uninstalling %s %s" (get_type is_cert) name;
147151 try
148152 Sys. remove filename;
149- rehash ()
153+ update_ca_bundle ()
150154 with
151155 | e ->
152156 warn " Exception uninstalling %s %s: %s" (get_type is_cert) name
Original file line number Diff line number Diff line change @@ -934,7 +934,7 @@ let xenopsd_queues = ref ([
934934
935935let default_xenopsd = ref " org.xen.xapi.xenops.xenlight"
936936
937- let ciphersuites_good_outbound = ref " !EXPORT:ECDHE-RSA-AES256-GCM- SHA384:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RSA+ AES128-SHA256 :AES128-SHA "
937+ let ciphersuites_good_outbound = ref " !EXPORT:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM- SHA384:AES256-SHA256:AES128-SHA :AES128-SHA256 "
938938let ciphersuites_legacy_outbound = ref " RSA+AES256-SHA:RSA+AES128-SHA:RSA+RC4-SHA:RSA+DES-CBC3-SHA"
939939
940940let gpumon_stop_timeout = ref 10.0
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ install:
6565 $(IPROG) sysconfig-xapi $(DESTDIR)/etc/sysconfig/xapi
6666 $(IPROG) generate_ssl_cert $(DESTDIR)$(LIBEXECDIR)
6767 $(IPROG) fix_firewall.sh $(DESTDIR)$(BINDIR)
68+ $(IPROG) update-ca-bundle.sh $(DESTDIR)$(BINDIR)
6869 mkdir -p $(DESTDIR)$(OPTDIR)/debug
6970 $(IPROG) debug_ha_query_liveset $(DESTDIR)$(OPTDIR)/debug
7071 $(IPROG) xe-scsi-dev-map $(DESTDIR)$(BINDIR)
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ writeconffile () {
6666
6767 # (This "good" list must match, or at least contain one of,
6868 # the ciphersuites-good-outbound list in /etc/xapi.conf.)
69- GOOD_CIPHERS=' ECDHE-RSA-AES256-GCM- SHA384:ECDHE-RSA-AES256-SHA384:AES256-SHA256:RSA+ AES128-SHA256 :AES128-SHA '
69+ GOOD_CIPHERS=' ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM- SHA384:AES256-SHA256:AES128-SHA :AES128-SHA256 '
7070 BACK_COMPAT_CIPHERS=' RSA+AES256-SHA:RSA+AES128-SHA:RSA+RC4-SHA:RSA+RC4-MD5:RSA+DES-CBC3-SHA'
7171
7272 if [ -n " ${STUNNEL_IDLE_TIMEOUT} " ]; then
@@ -81,7 +81,7 @@ writeconffile () {
8181 echo " ; Autogenerated by ${0} " > $SSLCONFFILE
8282 writec ' ; during xapi start-up.'
8383 writec ' ; '
84- if [ ${ANCIENT_STUNNEL} = 0 ]; then
84+ if [ ${ANCIENT_STUNNEL} = 0 ] && [ x " $CC_PREPARATIONS " != x " true " ] ; then
8585 # stunnel 4.56 fips demands sslVersion = TLSv1 (not "all" or even
8686 # "TLSv1.2") so we cannot use fips mode.
8787 writec ' fips = no'
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # Copyright (c) Citrix Systems 2008. All rights reserved.
4+ #
5+
6+ set -e
7+
8+ mkdir -p /etc/stunnel
9+ find /etc/stunnel/certs -name ' *.pem' | xargs cat > /etc/stunnel/xapi-stunnel-ca-bundle.pem.tmp
10+ mv /etc/stunnel/xapi-stunnel-ca-bundle.pem.tmp /etc/stunnel/xapi-stunnel-ca-bundle.pem
You can’t perform that action at this time.
0 commit comments