Skip to content

Commit 324c0e0

Browse files
authored
Add files via upload
1 parent fcd243c commit 324c0e0

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

Build Scripts/FBConfigBuild.vbs

710 Bytes
Binary file not shown.

Build Scripts/FBManageCluster.vbs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,12 +966,14 @@ Sub SetClusNetworkProps(strClusterNetwork, strClusterAction)
966966
Call SetResourceOff(strClusterNetwork, "")
967967
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PROP PendingTimeout=600000:DWORD "
968968
Call Util_RunExec(strCmd, "", strResponseYes, 0)
969-
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PRIV PublishPTRRecords=1 "
970-
Call Util_RunExec(strCmd, "", strResponseYes, 0)
971969
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PRIV RequireDNS=1:DWORD "
972970
Call Util_RunExec(strCmd, "", strResponseYes, 0)
973971
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PRIV RequireKerberos=1:DWORD "
974972
Call Util_RunExec(strCmd, "", strResponseYes, 0)
973+
If Len(strClusterNetwork) <= 15 Then
974+
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PRIV PublishPTRRecords=1 "
975+
Call Util_RunExec(strCmd, "", strResponseYes, 0)
976+
End If
975977
If strClusterNetwork = strClusterNetworkAO Then
976978
strCmd = "CLUSTER """ & strClusterName & """ RESOURCE """ & strClusterNetwork & """ /PRIV RegisterAllProvidersIP = 0"
977979
Call Util_RunExec(strCmd, "", strResponseYes, 5024)

Build Scripts/FBManageSecurity.vbs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -961,18 +961,20 @@ End Sub
961961

962962

963963
Sub SetSSLCert()
964-
Call DebugLog("SetSSLCert: " & strAction)
964+
Call DebugLog("SetSSLCert:")
965+
Dim strSSLCertPassword
965966

967+
strSSLCertPassword = GetBuildfileValue("SSLCertPassword")
966968
Select Case True
967969
Case GetBuildfileValue("SetSSLSelfCert") = "YES"
968-
strCmd = "POWERSHELL New-SelfSignedCertificate -DNSName ""*." & strUserDNSDomain & """ -FriendlyName """ & strSSLCert & """ -CertStoreLocation ""cert:\LocalMachine\My"" -NotBefore GetDate(-Date ""2001-01-01T00:00:00"") -NotAfter GetDate(-Date ""2999-12-31T23:59:59"") "
970+
strCmd = "POWERSHELL New-SelfSignedCertificate -DNSName '*." & strUserDNSDomain & "' -FriendlyName '" & strSSLCert & "' -CertStoreLocation 'cert:\LocalMachine\My' -NotBefore '2001-01-01T00:00:00' -NotAfter '2999-12-31T23:59:59' "
969971
Call Util_RunExec(strCmd, "", "", -1) ' Attributes: RSA, 2048 bit; Defaults: Client Authentication, Server Authentication; Usable for: Digital Signature, Key Encipherment
970-
Call SetBuildMessage(strMsgErrorConfig, "/SetSSLSelfCert: is not yet supported in SQL FineBuild")
971972
Case CheckFile(strSSLCertFile) = True
972-
strSSLCertThumb = GetPSData("$Cert = Import-Certificate -FilePath """ & "path" & """ -CertStoreLocation ""cert:\LocalMachine\My"" | $Cert.FriendlyName = """ & strSSLCert & """ | $Cert.ThumbPrint")
973-
Call SetBuildMessage(strMsgErrorConfig, "/SSLCertFile: is not yet supported in SQL FineBuild")
973+
strCmd = "POWERSHELL $Cert = Import-PfxCertificate -FilePath '" & strSSLCertFile & "' -Password '" & strSSLCertPassword & "' -CertStoreLocation 'cert:\LocalMachine\My' | $Cert.FriendlyName = '" & strSSLCert & "' "
974+
Call Util_RunExec(strCmd, "", "", -1)
975+
Call SetBuildMessage(strMsgError, "/SSLCertFile: is not yet supported in SQL FineBuild")
974976
Case Else
975-
Call SetBuildMessage(strMsgErrorConfig, "Unable to find /SSLCertFile:" & strSSLCertFile)
977+
Call SetBuildMessage(strMsgError, "Unable to find /SSLCertFile:" & strSSLCertFile)
976978
End Select
977979

978980
strSSLCertThumb = GetCertAttr(strSSLCert, "Thumbprint")
@@ -987,12 +989,12 @@ Sub SetTDECert(strAction)
987989
strPath = FormatFolder(GetBuildfileValue("DirSystemDataSharedPrimary")) & "Cert" & strTDECert
988990
Select Case True
989991
Case strAction = "INSTALL"
990-
Call Util_ExecSQL(strCmdSQL & "-Q", """IF NOT EXISTS (SELECT 1 FROM sys.certificates WHERE name = '" & strTDECert & "') CREATE CERTIFICATE " & strTDECert & " WITH SUBJECT='" & Replace(strTDECert, "_", " ") & "', START_DATE='2000/01/01', EXPIRY_DATE='2999/12/31';""", 0)
992+
Call Util_ExecSQL(strCmdSQL & "-Q", """IF NOT EXISTS (SELECT 1 FROM sys.certificates WHERE name = '" & strTDECert & "') CREATE CERTIFICATE [" & strTDECert & "] WITH SUBJECT='" & Replace(strTDECert, "_", " ") & "', START_DATE='2000/01/01', EXPIRY_DATE='2999/12/31';""", 0)
991993
Call DeleteFile(strPath & ".snk")
992994
Call DeleteFile(strPath & ".pvk")
993995
Call Util_ExecSQL(strCmdSQL & "-Q", """BACKUP CERTIFICATE " & strTDECert & " TO FILE='" & strPath & ".snk' WITH PRIVATE KEY (FILE='" & strPath & ".pvk', ENCRYPTION BY PASSWORD='" & strKeyPassword & "');""", 0)
994996
Case Else
995-
Call Util_ExecSQL(strCmdSQL & "-Q", """IF NOT EXISTS (SELECT 1 FROM sys.certificates WHERE name = '" & strTDECert & "') CREATE CERTIFICATE " & strTDECert & " FROM FILE='" & strPath & ".snk' WITH PRIVATE KEY (FILE='" & strPath & ".pvk', DECRYPTION BY PASSWORD='" & strKeyPassword & "');""", -1)
997+
Call Util_ExecSQL(strCmdSQL & "-Q", """IF NOT EXISTS (SELECT 1 FROM sys.certificates WHERE name = '" & strTDECert & "') CREATE CERTIFICATE [" & strTDECert & "] FROM FILE='" & strPath & ".snk' WITH PRIVATE KEY (FILE='" & strPath & ".pvk', DECRYPTION BY PASSWORD='" & strKeyPassword & "');""", -1)
996998
End Select
997999

9981000
End Sub
@@ -1089,7 +1091,7 @@ Sub SetSQLDBSSL(strSQLDBPath, strSQLDBAccount)
10891091
End Sub
10901092

10911093
Sub SetSSLCert()
1092-
' Call FBManageSecurity.SetSSLCert()
1094+
Call FBManageSecurity.SetSSLCert()
10931095
End Sub
10941096

10951097
Sub SetTDECert(strAction)
192 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)