forked from awslabs/mls-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for P384 public key algorithm (awslabs#251)
* Add support for P384 public key algorithm I found that I could not use root certificates which use a P384 public key algorithm. More specifically, passing in a certificate with ``` $ openssl x509 -noout -text -in root.der … Subject Public Key Info: Public Key Algorithm: id-ecPublicKey Public-Key: (384 bit) pub: … ASN1 OID: secp384r1 NIST CURVE: P-384 … ``` gives me ``` EcX509Error(UnsupportedPublicKeyAlgorithm("ObjectIdentifier(1.2.840.10045.2.1)")) ``` back. The changes here seem to fix this, but I’ll admit that they were made very mechanically based on the existing code. This would be a continuation of the work in awslabs#190. * Add P384 certificate test The test certificate was generated using certificatetools.com, which I believe is where the others were generated as well.
- Loading branch information
Showing
10 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions
15
mls-rs-crypto-rustcrypto/test_data/x509/root_ca_p384/cert.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIICQjCCAcmgAwIBAgIUT4DMt5h05A+ykGMRVbfdrUHl7AswCgYIKoZIzj0EAwMw | ||
TzEeMBwGA1UEAwwVUDM4NCBSb290IENlcnRpZmljYXRlMQswCQYDVQQGEwJDSDEP | ||
MA0GA1UECAwGWnVyaWNoMQ8wDQYDVQQHDAZadXJpY2gwHhcNMjUwMjAzMTMwODM4 | ||
WhcNMjkwMjAyMTMwODM4WjBPMR4wHAYDVQQDDBVQMzg0IFJvb3QgQ2VydGlmaWNh | ||
dGUxCzAJBgNVBAYTAkNIMQ8wDQYDVQQIDAZadXJpY2gxDzANBgNVBAcMBlp1cmlj | ||
aDB2MBAGByqGSM49AgEGBSuBBAAiA2IABG+BvLAs4Au1tGJv264lwur+hg8aWChz | ||
FZjNFsb5cOWaW6Jz9U8Ol1WCmePEhQq58L1HIEM+J0LTMyUSUScF09eLtRHHyBGw | ||
1waFRbTtkKTGcRlXhs+6L3uVrPTAxgF0CqNmMGQwHQYDVR0OBBYEFFLcd/9H9lJs | ||
sRQjLtdgBwD7kCpIMB8GA1UdIwQYMBaAFFLcd/9H9lJssRQjLtdgBwD7kCpIMA4G | ||
A1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMAoGCCqGSM49BAMDA2cA | ||
MGQCMDE6A9SpFq96xvo/IKLG2VWyRwS+7zTzkyyL/Rcb8NLG9sz6hAISMYdYXFJF | ||
bF90DQIweOBNWH8754M9bBB7VQAB3gp5T2HTMGaKz8xRxYasyVSDffpP+sgBcWrP | ||
A0qSCQ6T | ||
-----END CERTIFICATE----- |
11 changes: 11 additions & 0 deletions
11
mls-rs-crypto-rustcrypto/test_data/x509/root_ca_p384/csr.pem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-----BEGIN CERTIFICATE REQUEST----- | ||
MIIBfTCCAQMCAQAwTzEeMBwGA1UEAwwVUDM4NCBSb290IENlcnRpZmljYXRlMQsw | ||
CQYDVQQGEwJDSDEPMA0GA1UECAwGWnVyaWNoMQ8wDQYDVQQHDAZadXJpY2gwdjAQ | ||
BgcqhkjOPQIBBgUrgQQAIgNiAARvgbywLOALtbRib9uuJcLq/oYPGlgocxWYzRbG | ||
+XDlmluic/VPDpdVgpnjxIUKufC9RyBDPidC0zMlElEnBdPXi7URx8gRsNcGhUW0 | ||
7ZCkxnEZV4bPui97laz0wMYBdAqgNTAzBgkqhkiG9w0BCQ4xJjAkMA4GA1UdDwEB | ||
/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMAoGCCqGSM49BAMDA2gAMGUCMQCg | ||
dRLyj0qX3jkt0m10833Wf/6wcqBgnURYQkw8ZJFtyswnYhPC9/Vs+LcIiuvrTIMC | ||
MBEWvCnOjtJ+83fqSsmJqydc4bvuj+APHIL7XFY/lRtGsy5tJKZRI8LfMmzjkCTv | ||
Ew== | ||
-----END CERTIFICATE REQUEST----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MIG2AgEAMBAGByqGSM49AgEGBSuBBAAiBIGeMIGbAgEBBDC1NU0+NlWxfTuZ7WmT | ||
mGxfyCI5e6/LCTjyWP9nTYNK8WzTLQ9b+6K/IZf0FRog+1+hZANiAARvgbywLOAL | ||
tbRib9uuJcLq/oYPGlgocxWYzRbG+XDlmluic/VPDpdVgpnjxIUKufC9RyBDPidC | ||
0zMlElEnBdPXi7URx8gRsNcGhUW07ZCkxnEZV4bPui97laz0wMYBdAo= | ||
-----END PRIVATE KEY----- |