mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
imported changes from mozilla NSS:
- Bug 1737470 - Ensure DER encoded signatures are within size limits. r=jschanck,mt,bbeurdouche,rrelyea - Bug 1735028 - check for missing signedData field r=keeler and bump patch version.
This commit is contained in:
parent
fceddf74e6
commit
5b0d1f871a
7 changed files with 145 additions and 78 deletions
|
|
@ -25,3 +25,16 @@ TEST_F(DecodeCertsTest, EmptyCertPackage) {
|
|||
sizeof(emptyCertPackage)));
|
||||
EXPECT_EQ(SEC_ERROR_BAD_DER, PR_GetError());
|
||||
}
|
||||
|
||||
TEST_F(DecodeCertsTest, EmptySignedData) {
|
||||
// This represents a PKCS#7 ContentInfo of contentType
|
||||
// 1.2.840.113549.1.7.2 (signedData) with missing content.
|
||||
unsigned char emptySignedData[] = {0x30, 0x80, 0x06, 0x09, 0x2a, 0x86,
|
||||
0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07,
|
||||
0x02, 0x00, 0x00, 0x05, 0x00};
|
||||
|
||||
EXPECT_EQ(nullptr,
|
||||
CERT_DecodeCertFromPackage(reinterpret_cast<char*>(emptySignedData),
|
||||
sizeof(emptySignedData)));
|
||||
EXPECT_EQ(SEC_ERROR_BAD_DER, PR_GetError());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue