pecert

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WIN_CERT_TYPE_X509             = 0x1
	WIN_CERT_TYPE_PKCS_SIGNED_DATA = 0x2
	WIN_CERT_TYPE_RESERVED_1       = 0x3
	WIN_CERT_TYPE_TS_STACK_SIGNED  = 0x4
)

Cert Type

Variables

This section is empty.

Functions

func GetCertTableDirectory

func GetCertTableDirectory(f *pe.File) (pe.DataDirectory, error)

GetCertTableDirectory returns the Certficate Table Directory from PE file.

func WCertTypeStr

func WCertTypeStr(c uint16) string

CertTypeStr returns the string of wCertficateType

Types

type AttributeCertificate

type AttributeCertificate struct {
	AttributeCertificateHeader
	BCertificate []byte
}

AttributeCertificate represents Attribute Certificates. https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#the-attribute-certificate-table-image-only

func GetAttributeCertificates

func GetAttributeCertificates(r io.ReaderAt) ([]AttributeCertificate, error)

GetAttributeCertificates returns AttributeCertificate(s) from r.

func GetAttributeCertificatesFromPath

func GetAttributeCertificatesFromPath(s string) ([]AttributeCertificate, error)

GetAttributeCertificatesFromPath returns AttributeCertificate(s) from filepath s.

type AttributeCertificateHeader

type AttributeCertificateHeader struct {
	DwLength         uint32
	WRevision        uint16
	WCertificateType uint16
}

AttributeCertificateHeader represents header of Attribute Certifiates. https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#the-attribute-certificate-table-image-only

func (AttributeCertificateHeader) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL