Skip to content

Commit

Permalink
Add more ECDSA certs
Browse files Browse the repository at this point in the history
  • Loading branch information
thohng committed Nov 18, 2024
1 parent 7ea275d commit 00cff22
Show file tree
Hide file tree
Showing 17 changed files with 146 additions and 0 deletions.
7 changes: 7 additions & 0 deletions DevNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ Improve load certificate, test TLS authentication, naming CertificateInfo config
- Test Authentication TLS
- Fix Authentication TLS on Windows: support reimport and change to default Exportable | EphemeralKeySet
- New configuration: CertificateConfig with key storage flags and reimport

### Generate Self-Signed Certificate
- `-TextExtension @("2.5.29.19={critical} {text}CA=false")`

- New-SelfSignedCertificate -CertStoreLocation 'Cert:\CurrentUser\My' -NotAfter (Get-Date).AddYears(50) -Subject 'development.dummy_ecdsa_p384-2024Nov' -FriendlyName 'development.dummy_ecdsa_p384-2024Nov' -KeyAlgorithm ECDSA_P384 -HashAlgorithm SHA384 -KeyUsage DigitalSignature,NonRepudiation -CurveExport CurveName

- New-SelfSignedCertificate -CertStoreLocation 'Cert:\CurrentUser\My' -NotAfter (Get-Date).AddYears(50) -Subject 'development.dummy_ecdsa_p521-2024Nov' -FriendlyName 'development.dummy_ecdsa_p521-2024Nov' -KeyAlgorithm ECDSA_P521 -HashAlgorithm SHA384 -KeyUsage DigitalSignature,NonRepudiation -CurveExport CurveName
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ public class CertificateLoaderEncryptionTest
[InlineData("development.dummy_ecdh_p384-2021June_nopass.pfx", false, false)]
[InlineData("development.dummy_ecdh_p521-2021June.pfx", false, true)]
[InlineData("development.dummy_ecdh_p521-2021June_nopass.pfx", false, false)]
[InlineData("development.dummy_ecdsa_p384-2024Nov_3ds-sha1.pfx", false, true)]
[InlineData("development.dummy_ecdsa_p384-2024Nov.pfx", false, true)]
[InlineData("development.dummy_ecdsa_p384-2024Nov_nopass.pfx", false, false)]
[InlineData("development.dummy_ecdsa_p521-2024Nov.pfx", false, true)]
[InlineData("development.dummy_ecdsa_p521-2024Nov_nopass.pfx", false, false)]
[InlineData("development.dummy-rsa-2071June.pfx", false, true)]
[InlineData("development.dummy-rsa-2071June_nopass.pfx", false, false)]
[InlineData("development.dummy-rsa4096-2071June.pfx", false, true)]
Expand All @@ -21,6 +26,10 @@ public class CertificateLoaderEncryptionTest
[InlineData("development.dummy_ecdh_p384-2021June_noenc.pem", true, false)]
[InlineData("development.dummy_ecdh_p521-2021June.pem", true, true)]
[InlineData("development.dummy_ecdh_p521-2021June_noenc.pem", true, false)]
[InlineData("development.dummy_ecdsa_p384-2024Nov.pem", true, true)]
[InlineData("development.dummy_ecdsa_p384-2024Nov_noenc.pem", true, false)]
[InlineData("development.dummy_ecdsa_p521-2024Nov.pem", true, true)]
[InlineData("development.dummy_ecdsa_p521-2024Nov_noenc.pem", true, false)]
[InlineData("development.dummy-rsa-2071June.pem", true, true)]
[InlineData("development.dummy-rsa-2071June_noenc.pem", true, false)]
[InlineData("development.dummy-rsa4096-2071June.pem", true, true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ public class CertificateLoaderTest
[InlineData("development.dummy_ecdh_p384-2021June.crt")]
[InlineData("development.dummy_ecdh_p521-2021June.cer")]
[InlineData("development.dummy_ecdh_p521-2021June.crt")]
[InlineData("development.dummy_ecdsa_p384-2024Nov.cer")]
[InlineData("development.dummy_ecdsa_p384-2024Nov.crt")]
[InlineData("development.dummy_ecdsa_p521-2024Nov.cer")]
[InlineData("development.dummy_ecdsa_p521-2024Nov.crt")]
[InlineData("development.dummy-rsa-2071June.cer")]
[InlineData("development.dummy-rsa-2071June.crt")]
[InlineData("development.dummy-rsa4096-2071June.cer")]
Expand Down
13 changes: 13 additions & 0 deletions test/NetLah.Extensions.Configuration.Test/Properties/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@
!development.dummy_ecdh_p521-2021June.pfx
!development.dummy_ecdh_p521-2021June_noenc.pem
!development.dummy_ecdh_p521-2021June_nopass.pfx
!development.dummy_ecdsa_p384-2024Nov.cer
!development.dummy_ecdsa_p384-2024Nov.crt
!development.dummy_ecdsa_p384-2024Nov.pem
!development.dummy_ecdsa_p384-2024Nov.pfx
!development.dummy_ecdsa_p384-2024Nov_3ds-sha1.pfx
!development.dummy_ecdsa_p384-2024Nov_noenc.pem
!development.dummy_ecdsa_p384-2024Nov_nopass.pfx
!development.dummy_ecdsa_p521-2024Nov.cer
!development.dummy_ecdsa_p521-2024Nov.crt
!development.dummy_ecdsa_p521-2024Nov.pem
!development.dummy_ecdsa_p521-2024Nov.pfx
!development.dummy_ecdsa_p521-2024Nov_noenc.pem
!development.dummy_ecdsa_p521-2024Nov_nopass.pfx
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
-----BEGIN CERTIFICATE-----
MIIB6zCCAXGgAwIBAgIQESKJDIyBwKxKog45Xsn0lzAKBggqhkjOPQQDAzAvMS0w
KwYDVQQDDCRkZXZlbG9wbWVudC5kdW1teV9lY2RzYV9wMzg0LTIwMjROb3YwIBcN
MjQxMTE4MDcyNDA5WhgPMjA3NDExMTgwNzM0MDhaMC8xLTArBgNVBAMMJGRldmVs
b3BtZW50LmR1bW15X2VjZHNhX3AzODQtMjAyNE5vdjB2MBAGByqGSM49AgEGBSuB
BAAiA2IABAO6V0U6H5pJsl9oVGwCY6sJxUPTt1n4lt66xcFnXz4GCzC97ki2GgJQ
MWeUUJAXpP2DCEGeUnyI0B0S6HpAYMjSQhNl6LzYacT6N1dOdvQMORbMxKyNdyQ2
LusP8Nt4H6NQME4wDgYDVR0PAQH/BAQDAgbAMB0GA1UdJQQWMBQGCCsGAQUFBwMC
BggrBgEFBQcDATAdBgNVHQ4EFgQU5CX4KzIWdZdXPJRkvPJKFMz/F6IwCgYIKoZI
zj0EAwMDaAAwZQIwPnsR+q2rWlwgzIg7LgADzsZIuBc9N0VGxmpWQhkcmJxtMfMn
i/8vhKShPLC1xNhsAjEA4SP/yreVNxpfE+TQt0T8+vw+tTW7UFzvUVKr3dyoNISP
Ldd2W1oh/yXBRkXGdsF3
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIH1MCgGCiqGSIb3DQEMAQMwGgQUyG07GfwI1mh6l72eNL2UaYlOJgYCAgQABIHI
/FUV+dupFdL/F9VslWyKfhnvanRjhxuOFxGj9y9SYFYQkajt/EX4c4dSMXAqrhiE
nAHFgarpC6qRD64MJCTOAxY6QSpc1Vdwh3whj+sy/q3KNYnOfDe5FnMDiTuYpfoR
65fpicD/T2bWcU4JOv0swieLCbmBRNOnuy7ABsMqgXc4QihKgjoBiDKu/Ema0jla
oZf0sUWMBMjcG7WL4gMg9qv4qnYOuiKyoHpyynhGucUMvhiEE5sf857UZTGh/ybR
p5FoKKbWCcs=
-----END ENCRYPTED PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIB6zCCAXGgAwIBAgIQESKJDIyBwKxKog45Xsn0lzAKBggqhkjOPQQDAzAvMS0w
KwYDVQQDDCRkZXZlbG9wbWVudC5kdW1teV9lY2RzYV9wMzg0LTIwMjROb3YwIBcN
MjQxMTE4MDcyNDA5WhgPMjA3NDExMTgwNzM0MDhaMC8xLTArBgNVBAMMJGRldmVs
b3BtZW50LmR1bW15X2VjZHNhX3AzODQtMjAyNE5vdjB2MBAGByqGSM49AgEGBSuB
BAAiA2IABAO6V0U6H5pJsl9oVGwCY6sJxUPTt1n4lt66xcFnXz4GCzC97ki2GgJQ
MWeUUJAXpP2DCEGeUnyI0B0S6HpAYMjSQhNl6LzYacT6N1dOdvQMORbMxKyNdyQ2
LusP8Nt4H6NQME4wDgYDVR0PAQH/BAQDAgbAMB0GA1UdJQQWMBQGCCsGAQUFBwMC
BggrBgEFBQcDATAdBgNVHQ4EFgQU5CX4KzIWdZdXPJRkvPJKFMz/F6IwCgYIKoZI
zj0EAwMDaAAwZQIwPnsR+q2rWlwgzIg7LgADzsZIuBc9N0VGxmpWQhkcmJxtMfMn
i/8vhKShPLC1xNhsAjEA4SP/yreVNxpfE+TQt0T8+vw+tTW7UFzvUVKr3dyoNISP
Ldd2W1oh/yXBRkXGdsF3
-----END CERTIFICATE-----
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN PRIVATE KEY-----
MIG/AgEAMBAGByqGSM49AgEGBSuBBAAiBIGnMIGkAgEBBDCtd51WUopNgTdtQx7A
plnOXSLTlH5gLo/hxs9IGcy+ORhFrdz7McSHgu+bjmrjFS2gBwYFK4EEACKhZANi
AAQDuldFOh+aSbJfaFRsAmOrCcVD07dZ+JbeusXBZ18+Bgswve5IthoCUDFnlFCQ
F6T9gwhBnlJ8iNAdEuh6QGDI0kITZei82GnE+jdXTnb0DDkWzMSsjXckNi7rD/Db
eB8=
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIB6zCCAXGgAwIBAgIQESKJDIyBwKxKog45Xsn0lzAKBggqhkjOPQQDAzAvMS0w
KwYDVQQDDCRkZXZlbG9wbWVudC5kdW1teV9lY2RzYV9wMzg0LTIwMjROb3YwIBcN
MjQxMTE4MDcyNDA5WhgPMjA3NDExMTgwNzM0MDhaMC8xLTArBgNVBAMMJGRldmVs
b3BtZW50LmR1bW15X2VjZHNhX3AzODQtMjAyNE5vdjB2MBAGByqGSM49AgEGBSuB
BAAiA2IABAO6V0U6H5pJsl9oVGwCY6sJxUPTt1n4lt66xcFnXz4GCzC97ki2GgJQ
MWeUUJAXpP2DCEGeUnyI0B0S6HpAYMjSQhNl6LzYacT6N1dOdvQMORbMxKyNdyQ2
LusP8Nt4H6NQME4wDgYDVR0PAQH/BAQDAgbAMB0GA1UdJQQWMBQGCCsGAQUFBwMC
BggrBgEFBQcDATAdBgNVHQ4EFgQU5CX4KzIWdZdXPJRkvPJKFMz/F6IwCgYIKoZI
zj0EAwMDaAAwZQIwPnsR+q2rWlwgzIg7LgADzsZIuBc9N0VGxmpWQhkcmJxtMfMn
i/8vhKShPLC1xNhsAjEA4SP/yreVNxpfE+TQt0T8+vw+tTW7UFzvUVKr3dyoNISP
Ldd2W1oh/yXBRkXGdsF3
-----END CERTIFICATE-----
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICNTCCAZegAwIBAgIQI2e1ZXzsobxKskTug53IJTAKBggqhkjOPQQDAzAvMS0w
KwYDVQQDDCRkZXZlbG9wbWVudC5kdW1teV9lY2RzYV9wNTIxLTIwMjROb3YwIBcN
MjQxMTE4MDczOTQ2WhgPMjA3NDExMTgwNzQ5NDZaMC8xLTArBgNVBAMMJGRldmVs
b3BtZW50LmR1bW15X2VjZHNhX3A1MjEtMjAyNE5vdjCBmzAQBgcqhkjOPQIBBgUr
gQQAIwOBhgAEAMeWuMzpHFGmqt+VXAAfnP8pznXCs3gJHc+6VidJa5n29weU7NQ6
7UNW3ZTFMoF+fGljWefS/aBG3LZizBAfWs7QAeU0Y6RaUqlHtbg2a9oinoP9T457
eGOIpaT/H+OnhsUiwzk1CEFvwkXvBYF3Y800LHr5e3v5JssqkuQ7s7RD7mfpo1Aw
TjAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMB
MB0GA1UdDgQWBBQroD9Ds/+FoY/+yNjqSp5ju3qCSDAKBggqhkjOPQQDAwOBiwAw
gYcCQQrcRGLcx/RquLPSled0yfe8AL3bGm38aJd9B0k/YNRCc6lQq1mO1dxAGTly
bn6czCrwfTC86F+7DOGqdx5jdM7gAkIAghES3FHq7NLIVKNQyfliH/i1/8SA4ERr
O8RCsNKjD8lwPjtCH0Bg/M7RW6QNljs7Y1S0rwrWHm66VtpOZnqeO8I=
-----END CERTIFICATE-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIBLjAoBgoqhkiG9w0BDAEDMBoE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Cc6lQq1mO1dxAGTly
bn6czCrwfTC86F+7DOGqdx5jdM7gAkIAghES3FHq7NLIVKNQyfliH/i1/8SA4ERr
O8RCsNKjD8lwPjtCH0Bg/M7RW6QNljs7Y1S0rwrWHm66VtpOZnqeO8I=
-----END CERTIFICATE-----
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN PRIVATE KEY-----
MIH3AgEAMBAGByqGSM49AgEGBSuBBAAjBIHfMIHcAgEBBEIAHsyLbqk2V9AHQAOI
4WmuyV47kI50sJqQcvh+OmVDn7bDhOuWNQWo6f/0u0Q8KJijERG0+4rGlSJcT2yA
6qVuglCgBwYFK4EEACOhgYkDgYYABADHlrjM6RxRpqrflVwAH5z/Kc51wrN4CR3P
ulYnSWuZ9vcHlOzUOu1DVt2UxTKBfnxpY1nn0v2gRty2YswQH1rO0AHlNGOkWlKp
R7W4NmvaIp6D/U+Oe3hjiKWk/x/jp4bFIsM5NQhBb8JF7wWBd2PNNCx6+Xt7+SbL
KpLkO7O0Q+5n6Q==
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIICNTCCAZegAwIBAgIQI2e1ZXzsobxKskTug53IJTAKBggqhkjOPQQDAzAvMS0w
KwYDVQQDDCRkZXZlbG9wbWVudC5kdW1teV9lY2RzYV9wNTIxLTIwMjROb3YwIBcN
MjQxMTE4MDczOTQ2WhgPMjA3NDExMTgwNzQ5NDZaMC8xLTArBgNVBAMMJGRldmVs
b3BtZW50LmR1bW15X2VjZHNhX3A1MjEtMjAyNE5vdjCBmzAQBgcqhkjOPQIBBgUr
gQQAIwOBhgAEAMeWuMzpHFGmqt+VXAAfnP8pznXCs3gJHc+6VidJa5n29weU7NQ6
7UNW3ZTFMoF+fGljWefS/aBG3LZizBAfWs7QAeU0Y6RaUqlHtbg2a9oinoP9T457
eGOIpaT/H+OnhsUiwzk1CEFvwkXvBYF3Y800LHr5e3v5JssqkuQ7s7RD7mfpo1Aw
TjAOBgNVHQ8BAf8EBAMCBsAwHQYDVR0lBBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMB
MB0GA1UdDgQWBBQroD9Ds/+FoY/+yNjqSp5ju3qCSDAKBggqhkjOPQQDAwOBiwAw
gYcCQQrcRGLcx/RquLPSled0yfe8AL3bGm38aJd9B0k/YNRCc6lQq1mO1dxAGTly
bn6czCrwfTC86F+7DOGqdx5jdM7gAkIAghES3FHq7NLIVKNQyfliH/i1/8SA4ERr
O8RCsNKjD8lwPjtCH0Bg/M7RW6QNljs7Y1S0rwrWHm66VtpOZnqeO8I=
-----END CERTIFICATE-----
Binary file not shown.

0 comments on commit 00cff22

Please sign in to comment.