diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/VLAN.VIRTUAL.YANG-HADES/epc.sfr.hades.vlan.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/VLAN.VIRTUAL.YANG-HADES/epc.sfr.hades.vlan.conf index 2710eb46934aae7f4e40c0b29b730bab686e9218..2663c76d529a6b8be14b60cfff55d932531d4bd0 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/VLAN.VIRTUAL.YANG-HADES/epc.sfr.hades.vlan.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/VLAN.VIRTUAL.YANG-HADES/epc.sfr.hades.vlan.conf @@ -30,7 +30,8 @@ MME : S6A : { - S6A_CONF = "../objs/UTILS/CONF/s6a.conf"; + # pwd=$OPENAIR_CN/objs + S6A_CONF = "./UTILS/CONF/s6a.conf"; }; # ------- SCTP definitions diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash b/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash index 864f3634b3791da172fdd653c1795d3055997194..a6639192831f431a3a9e5b86a588c50ceeb721a0 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/start_epc.bash @@ -284,6 +284,7 @@ fi ################################################## # LAUNCH MME + S+P-GW executable ################################################## +check_s6a_certificate cd $OPENAIRCN_DIR/$OBJ_DIR diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash index 75ab815728dc577e0bcc9c83bcdab850d6271add..3fbfe647b9adc9dc239ceb931435b619576461e7 100755 --- a/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash +++ b/targets/PROJECTS/GENERIC-LTE-EPC/utils.bash @@ -1071,6 +1071,27 @@ clean_network() { done } +check_s6a_certificate() { + if [ -d /usr/local/etc/freeDiameter ] + then + if [ -f /usr/local/etc/freeDiameter/user.cert.pem ] + then + full_hostname=`cat /usr/local/etc/freeDiameter/user.cert.pem | grep "Subject" | grep "CN" | cut -d '=' -f6` + if [ a$full_hostname == a`hostname`.eur ] + then + echo_success "S6A: Found valid certificate in /usr/local/etc/freeDiameter" + return 1 + fi + fi + fi + echo_error "S6A: Did not find valid certificate in /usr/local/etc/freeDiameter" + echo_warning "S6A: generatting new certificate in /usr/local/etc/freeDiameter..." + cd $OPENAIRCN_DIR/S6A/freediameter + ./make_certs.sh + check_s6a_certificate + return 1 +} + ########################################################### IPTABLES=/sbin/iptables THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))