BPHRSSL ;GDHD/HCS/ALA-Update SSL ; 07 Sep 2016 11:24 AM
;;2.1;IHS PERSONAL HEALTH RECORD;**1**;Apr 01, 2014;Build 23
Q
;
EN ;EP - Look for the PHR SSL servers
NEW SYSXREF,SYSGL,SSLFND,SSLNAME,SSLFNDT,SSLFNDP
S SYSXREF="^[""%SYS""]SYS",SYSGL=$NA(@SYSXREF)
S (SSLFNDP,SSLFNDT,SSLNAME)="" F S SSLNAME=$O(@SYSGL@("Security","SSLConfigsD",SSLNAME)) Q:SSLNAME="" D
. NEW UPNAME
. S UPNAME=$$UP^XLFSTR(SSLNAME)
. I UPNAME="PHRSRVC" S SSLFNDT=SSLNAME
. I UPNAME="PHRPSRV" S SSLFNDP=SSLNAME
;
;If no test entry, create one
I SSLFNDT="" D
. NEW EXEC,SOBJ,STS,ONAMESPC
. S EXEC="S ONAMESPC=$"_"ZNSPACE" X EXEC
. S EXEC="ZN ""%SYS""" X EXEC
. S EXEC="S SOBJ=##CLASS(Security.SSLConfigs).%New()" X EXEC
. S EXEC="S SOBJ.Description=""PHR Test Server""" X EXEC
. S EXEC="S SOBJ.Name=""PHRSRVC""" X EXEC
. S EXEC="S SOBJ.CipherList=""TLSv1:SSLv3:!ADH:!LOW:!EXP:@STRENGTH""" X EXEC
. S EXEC="S SOBJ.PrivateKeyType=2" X EXEC
. S EXEC="S SOBJ.Protocols=6" X EXEC
. S EXEC="S SOBJ.Type=0" X EXEC
. S EXEC="S SOBJ.VerifyDepth=9" X EXEC
. S EXEC="S SOBJ.VerifyPeer=0" X EXEC
. S EXEC="S SOBJ.Enabled=1" X EXEC
. S EXEC="S STS=SOBJ.%Save()" X EXEC
. S SSLNAME="PHRSRVC"
. S EXEC="ZN ONAMESPC" X EXEC
;
;If no production entry, create one
I SSLFNDP="" D
. NEW EXEC,SOBJ,STS,ONAMESPC
. S EXEC="S ONAMESPC=$"_"ZNSPACE" X EXEC
. S EXEC="ZN ""%SYS""" X EXEC
. S EXEC="S SOBJ=##CLASS(Security.SSLConfigs).%New()" X EXEC
. S EXEC="S SOBJ.Description=""PHR Production Server""" X EXEC
. S EXEC="S SOBJ.Name=""PHRPSRV""" X EXEC
. S EXEC="S SOBJ.CipherList=""TLSv1:SSLv3:!ADH:!LOW:!EXP:@STRENGTH""" X EXEC
. S EXEC="S SOBJ.PrivateKeyType=2" X EXEC
. S EXEC="S SOBJ.Protocols=6" X EXEC
. S EXEC="S SOBJ.Type=0" X EXEC
. S EXEC="S SOBJ.VerifyDepth=9" X EXEC
. S EXEC="S SOBJ.VerifyPeer=0" X EXEC
. S EXEC="S SOBJ.Enabled=1" X EXEC
. S EXEC="S STS=SOBJ.%Save()" X EXEC
. S SSLNAME="PHRPSRV"
. S EXEC="ZN ONAMESPC" X EXEC
;
Q
BPHRSSL ;GDHD/HCS/ALA-Update SSL ; 07 Sep 2016 11:24 AM
+1 ;;2.1;IHS PERSONAL HEALTH RECORD;**1**;Apr 01, 2014;Build 23
+2 QUIT
+3 ;
EN ;EP - Look for the PHR SSL servers
+1 NEW SYSXREF,SYSGL,SSLFND,SSLNAME,SSLFNDT,SSLFNDP
+2 SET SYSXREF="^[""%SYS""]SYS"
SET SYSGL=$NAME(@SYSXREF)
+3 SET (SSLFNDP,SSLFNDT,SSLNAME)=""
FOR
SET SSLNAME=$ORDER(@SYSGL@("Security","SSLConfigsD",SSLNAME))
IF SSLNAME=""
QUIT
Begin DoDot:1
+4 NEW UPNAME
+5 SET UPNAME=$$UP^XLFSTR(SSLNAME)
+6 IF UPNAME="PHRSRVC"
SET SSLFNDT=SSLNAME
+7 IF UPNAME="PHRPSRV"
SET SSLFNDP=SSLNAME
End DoDot:1
+8 ;
+9 ;If no test entry, create one
+10 IF SSLFNDT=""
Begin DoDot:1
+11 NEW EXEC,SOBJ,STS,ONAMESPC
+12 SET EXEC="S ONAMESPC=$"_"ZNSPACE"
XECUTE EXEC
+13 SET EXEC="ZN ""%SYS"""
XECUTE EXEC
+14 SET EXEC="S SOBJ=##CLASS(Security.SSLConfigs).%New()"
XECUTE EXEC
+15 SET EXEC="S SOBJ.Description=""PHR Test Server"""
XECUTE EXEC
+16 SET EXEC="S SOBJ.Name=""PHRSRVC"""
XECUTE EXEC
+17 SET EXEC="S SOBJ.CipherList=""TLSv1:SSLv3:!ADH:!LOW:!EXP:@STRENGTH"""
XECUTE EXEC
+18 SET EXEC="S SOBJ.PrivateKeyType=2"
XECUTE EXEC
+19 SET EXEC="S SOBJ.Protocols=6"
XECUTE EXEC
+20 SET EXEC="S SOBJ.Type=0"
XECUTE EXEC
+21 SET EXEC="S SOBJ.VerifyDepth=9"
XECUTE EXEC
+22 SET EXEC="S SOBJ.VerifyPeer=0"
XECUTE EXEC
+23 SET EXEC="S SOBJ.Enabled=1"
XECUTE EXEC
+24 SET EXEC="S STS=SOBJ.%Save()"
XECUTE EXEC
+25 SET SSLNAME="PHRSRVC"
+26 SET EXEC="ZN ONAMESPC"
XECUTE EXEC
End DoDot:1
+27 ;
+28 ;If no production entry, create one
+29 IF SSLFNDP=""
Begin DoDot:1
+30 NEW EXEC,SOBJ,STS,ONAMESPC
+31 SET EXEC="S ONAMESPC=$"_"ZNSPACE"
XECUTE EXEC
+32 SET EXEC="ZN ""%SYS"""
XECUTE EXEC
+33 SET EXEC="S SOBJ=##CLASS(Security.SSLConfigs).%New()"
XECUTE EXEC
+34 SET EXEC="S SOBJ.Description=""PHR Production Server"""
XECUTE EXEC
+35 SET EXEC="S SOBJ.Name=""PHRPSRV"""
XECUTE EXEC
+36 SET EXEC="S SOBJ.CipherList=""TLSv1:SSLv3:!ADH:!LOW:!EXP:@STRENGTH"""
XECUTE EXEC
+37 SET EXEC="S SOBJ.PrivateKeyType=2"
XECUTE EXEC
+38 SET EXEC="S SOBJ.Protocols=6"
XECUTE EXEC
+39 SET EXEC="S SOBJ.Type=0"
XECUTE EXEC
+40 SET EXEC="S SOBJ.VerifyDepth=9"
XECUTE EXEC
+41 SET EXEC="S SOBJ.VerifyPeer=0"
XECUTE EXEC
+42 SET EXEC="S SOBJ.Enabled=1"
XECUTE EXEC
+43 SET EXEC="S STS=SOBJ.%Save()"
XECUTE EXEC
+44 SET SSLNAME="PHRPSRV"
+45 SET EXEC="ZN ONAMESPC"
XECUTE EXEC
End DoDot:1
+46 ;
+47 QUIT