-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Certificate got another ctor which takes the flags to pass when formatting the X509_NAME values - The default formatting changed to XN_FLAG_RFC2253 but can be overridden from the outside by defining UTHENTICODE_DEFAULT_XN_FLAGS - This introduces an incompatibility _if_ the caller assumes that the issuer and subject can be compared in their string form
- Loading branch information
1 parent
f81d3a8
commit 7e24241
Showing
3 changed files
with
50 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,13 @@ TEST_F(Auth32Test, Certificate_properties) { | |
ASSERT_TRUE(signed_data.has_value()); | ||
|
||
auto signers = signed_data->get_signers(); | ||
ASSERT_EQ(signers[0].get_subject(), "/[email protected]"); | ||
ASSERT_EQ(signers[0].get_issuer(), "/[email protected]"); | ||
ASSERT_EQ(signers[0].get_subject(), "[email protected]"); | ||
ASSERT_EQ(signers[0].get_issuer(), "[email protected]"); | ||
ASSERT_EQ(signers[0].get_serial_number(), "4B2A0A5FE84F83BE4B5F587EC325FDA3"); | ||
|
||
auto certificates = signed_data->get_certificates(); | ||
ASSERT_EQ(certificates[0].get_subject(), "/[email protected]"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "/[email protected]"); | ||
ASSERT_EQ(certificates[0].get_subject(), "[email protected]"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "[email protected]"); | ||
ASSERT_EQ(certificates[0].get_serial_number(), "4B2A0A5FE84F83BE4B5F587EC325FDA3"); | ||
} | ||
|
||
|
@@ -30,13 +30,13 @@ TEST_F(Auth32PlusTest, Certificate_properties) { | |
ASSERT_TRUE(signed_data.has_value()); | ||
|
||
auto signers = signed_data->get_signers(); | ||
ASSERT_EQ(signers[0].get_subject(), "/[email protected]"); | ||
ASSERT_EQ(signers[0].get_issuer(), "/[email protected]"); | ||
ASSERT_EQ(signers[0].get_subject(), "[email protected]"); | ||
ASSERT_EQ(signers[0].get_issuer(), "[email protected]"); | ||
ASSERT_EQ(signers[0].get_serial_number(), "5C01626BE30E6696475724EFA09135F3"); | ||
|
||
auto certificates = signed_data->get_certificates(); | ||
ASSERT_EQ(certificates[0].get_subject(), "/[email protected]"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "/[email protected]"); | ||
ASSERT_EQ(certificates[0].get_subject(), "[email protected]"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "[email protected]"); | ||
ASSERT_EQ(certificates[0].get_serial_number(), "5C01626BE30E6696475724EFA09135F3"); | ||
} | ||
|
||
|
@@ -47,27 +47,27 @@ TEST_F(AuthNest32Test, Certificate_properties_nested) { | |
ASSERT_TRUE(signed_data.has_value()); | ||
|
||
auto signers = signed_data->get_signers(); | ||
ASSERT_EQ(signers[0].get_subject(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_issuer(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_subject(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_issuer(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_serial_number(), "103EE193544680954387616BB5ECA399"); | ||
|
||
auto certificates = signed_data->get_certificates(); | ||
ASSERT_EQ(certificates[0].get_subject(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_subject(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_serial_number(), "103EE193544680954387616BB5ECA399"); | ||
|
||
auto nested_signed_data = signed_data->get_nested_signed_data(); | ||
|
||
ASSERT_TRUE(nested_signed_data.has_value()); | ||
|
||
auto nested_signers = nested_signed_data->get_signers(); | ||
ASSERT_EQ(nested_signers[0].get_subject(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_issuer(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_subject(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_issuer(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_serial_number(), "2D96C54BA915F7B04781D80A799534B1"); | ||
|
||
auto nested_certificates = nested_signed_data->get_certificates(); | ||
ASSERT_EQ(nested_certificates[0].get_subject(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_issuer(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_subject(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_issuer(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_serial_number(), "2D96C54BA915F7B04781D80A799534B1"); | ||
} | ||
|
||
|
@@ -78,26 +78,26 @@ TEST_F(AuthNest32PlusTest, Certificate_properties_nested) { | |
ASSERT_TRUE(signed_data.has_value()); | ||
|
||
auto signers = signed_data->get_signers(); | ||
ASSERT_EQ(signers[0].get_subject(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_issuer(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_subject(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_issuer(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(signers[0].get_serial_number(), "1DFA12996D33C09D499BE8489BE35DE5"); | ||
|
||
auto certificates = signed_data->get_certificates(); | ||
ASSERT_EQ(certificates[0].get_subject(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "/CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_subject(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_issuer(), "CN=A SHA-1 cert"); | ||
ASSERT_EQ(certificates[0].get_serial_number(), "1DFA12996D33C09D499BE8489BE35DE5"); | ||
|
||
auto nested_signed_data = signed_data->get_nested_signed_data(); | ||
|
||
ASSERT_TRUE(nested_signed_data.has_value()); | ||
|
||
auto nested_signers = nested_signed_data->get_signers(); | ||
ASSERT_EQ(nested_signers[0].get_subject(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_issuer(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_subject(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_issuer(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_signers[0].get_serial_number(), "24669C98D6ED318540F4953CD30250AB"); | ||
|
||
auto nested_certificates = nested_signed_data->get_certificates(); | ||
ASSERT_EQ(nested_certificates[0].get_subject(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_issuer(), "/CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_subject(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_issuer(), "CN=A SHA-256 cert"); | ||
ASSERT_EQ(nested_certificates[0].get_serial_number(), "24669C98D6ED318540F4953CD30250AB"); | ||
} |