Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid SignedData #1

Closed
0xlane opened this issue Sep 11, 2024 · 1 comment
Closed

Invalid SignedData #1

0xlane opened this issue Sep 11, 2024 · 1 comment

Comments

@0xlane
Copy link
Owner

0xlane commented Sep 11, 2024

image

Error message:

PS C:\> pesign print "C:\Program Files\dotnet\dotnet.exe" --signer-info
Signer Info:
    Signer Identifier:
        Issuer And Serial Number:
            Issuer: C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Code Signing PCA 2011
            Serial Number:
                33:00:00:03:d3:76:69:dc:80:ec:01:a2:43:00:00:00:00:03:d3
    Authenticated Attributes:
        1.2.840.113549.1.9.3:
            06:0a:2b:06:01:04:01:82:37:02:01:04
        1.3.6.1.4.1.311.2.1.11:
            30:0c:06:0a:2b:06:01:04:01:82:37:02:01:15
        1.2.840.113549.1.9.4:
            04:20:5a:e4:f6:41:bf:3f:e3:4b:38:f9:f7:f0:ff:7d:1c:b6:b5:d2:
            bf:1a:d4:e1:22:28:d4:db:be:cf:3e:4f:69:95
        1.3.6.1.4.1.311.2.1.12:
            30:32:a0:14:80:12:00:2e:00:4e:00:45:00:54:00:20:00:48:00:6f:
            00:73:00:74:a1:1a:80:18:68:74:74:70:3a:2f:2f:77:77:77:2e:6d:
            69:63:72:6f:73:6f:66:74:2e:63:6f:6d
    Unauthenticated Attributes:
        1.3.6.1.4.1.311.3.3.1:
            30:82:17:10:06:09:2a:86:48:86:f7:0d:01:07:02:a0:82:17:01:30:
            82:16:fd:02:01:03:31:0f:30:0d:06:09:60:86:48:01:65:03:04:02:
            ...
thread 'main' panicked at library\std\src\io\mod.rs:1844:21:
a formatting trait implementation returned an error when the underlying stream did not
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@0xlane
Copy link
Owner Author

0xlane commented Sep 11, 2024

References from RustCrypto/formats#1452.

Currently, pesign only parse CertificateChoices::certificate , skip other enum value.

CertificateSet ::= SET OF CertificateChoices
CertificateChoices ::= CHOICE {
	certificate Certificate,
	extendedCertificate [0] IMPLICIT ExtendedCertificate, -- Obsolete
	v1AttrCert [1] IMPLICIT AttributeCertificateV1,       -- Obsolete
	v2AttrCert [2] IMPLICIT AttributeCertificateV2,
	other [3] IMPLICIT OtherCertificateFormat 
}

@0xlane 0xlane closed this as completed in 046778a Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant