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

How to get the certificate signature time of the pe file #82

Open
xdeng opened this issue Jul 16, 2023 · 4 comments
Open

How to get the certificate signature time of the pe file #82

xdeng opened this issue Jul 16, 2023 · 4 comments

Comments

@xdeng
Copy link

xdeng commented Jul 16, 2023

How to get the certificate signature time of the pe file???

@xdeng
Copy link
Author

xdeng commented Jul 16, 2023

szOID_RSA_signingTime

@xdeng
Copy link
Author

xdeng commented Jul 16, 2023

var signingTime time.Time
err := pe.Certificates.Content.UnmarshalSignedAttribute(pkcs7.OIDAttributeSigningTime, &signingTime)
if err == nil {
    fmt.Println(signingTime)
}

Some pe files cannot get data by this method

@xdeng
Copy link
Author

xdeng commented Jul 18, 2023

pe.Certificates.Content.Signers[0].UnauthenticatedAttributes[0]
OidAttributeCounterSign ---> asn1.Unmarshal pkcs7.SignerInfo ---> OidAttributeSigningTime

@ayoubfaouzi
Copy link
Member

Hello @xdeng

Thanks for your feedback, I will have a look tomorrow.

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

2 participants