-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetTlsBSI.ps1
21 lines (17 loc) · 1.08 KB
/
SetTlsBSI.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# BSI TR-02102 Kryptographische Verfahren: Empfehlungen und Schlüssellängen
# https://www.bsi.bund.de/DE/Themen/Unternehmen-und-Organisationen/Standards-und-Zertifizierung/Technische-Richtlinien/TR-nach-Thema-sortiert/tr02102/tr02102_node.html
# BSI TR-02102-2 Kryptographische Verfahren: Verwendung von Transport Layer Security (TLS)" Version: 2023-1
# https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR02102/BSI-TR-02102-2.pdf?__blob=publicationFile&v=6
$TLS12CS = Get-Content 'BSI TR-02102-2 TLS1.2 PFS Cipher Suites.txt'
$TLS13CS = Get-Content 'BSI TR-02102-2 TLS1.3 Cipher Suites.txt'
# backup active TlsCipherSuites to file
(Get-TlsCipherSuite).Name |Out-File -FilePath "TlsCipherSuitsBackup $(Get-Date -Format 'yyyyMMddHHMMss').txt"
# remove all TlsCipherSuites
Foreach ($CS in (Get-TlsCipherSuite -Name ''))
{Disable-TlsCipherSuite -Name $CS.Name}
# inject TLSv12 TlsCipherSuites
Foreach ($CS in $TLS12CS)
{Enable-TlsCipherSuite -Name $CS}
# inject TLSv13 TlsCipherSuites
Foreach ($CS in $TLS13CS)
{Enable-TlsCipherSuite -Name $CS}