Skip to content

Commit 73f3f07

Browse files
author
Uwe Gradenegger
committed
Refactor Sid Extension COde
1 parent e7641a8 commit 73f3f07

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Functions/New-SidExtension.ps1

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,17 @@ Function New-SidExtension {
1616

1717
$Output = ''
1818

19-
# Object Identifier 1.3.6.1.4.1.311.25.2.1
20-
$Output += "060A2B060104018237190201"
21-
2219
# OCTET_STRING
23-
$Entry = Convert-StringToDER `
20+
$Output = Convert-StringToDER `
2421
-IdentifierOctets "04" `
2522
-ContentOctets $(Convert-StringtoHex -String $Sid)
2623

27-
# Building the Nodes
28-
29-
$Output += Convert-StringToDER `
24+
$Output = Convert-StringToDER `
3025
-IdentifierOctets "A0" `
31-
-ContentOctets $Entry
26+
-ContentOctets $Output
27+
28+
# Object Identifier 1.3.6.1.4.1.311.25.2.1
29+
$Output = "060A2B060104018237190201" + $Output
3230

3331
$Output = Convert-StringToDER `
3432
-IdentifierOctets "A0" `

0 commit comments

Comments
 (0)