pecoff

package
v0.0.0-...-48be911 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BinaryTest = []byte{} /* 38912 elements not displayed */

Functions

func AppendToBinary

func AppendToBinary(PEFile *PECOFFSigningContext, sig []byte) ([]byte, error)

func CreateSignature

func CreateSignature(ctx *PECOFFSigningContext, Cert *x509.Certificate, Key crypto.Signer) ([]byte, error)

func GetSignatureBytesFromFile

func GetSignatureBytesFromFile(pefile []byte) ([]byte, error)

This fetches the attached signature data

func GetSignatureDataDirectory

func GetSignatureDataDirectory(pefile []byte) (pe.DataDirectory, error)

func GetSignatures

func GetSignatures(pefile []byte) ([]*signature.WINCertificate, error)

func Padding

func Padding(src []byte, blockSize int) []byte

func PaddingBytes

func PaddingBytes(srcLen, blockSize int) ([]byte, int)

Types

type PECOFFSigningContext

type PECOFFSigningContext struct {
	Cert     *x509.Certificate
	Key      *rsa.PrivateKey
	DD4Start int64
	DD4End   int64
	PEFile   []byte
	SigData  *bytes.Buffer
	Indirect bool
}

func PECOFFChecksum

func PECOFFChecksum(peFile []byte) *PECOFFSigningContext

Jump to

Keyboard shortcuts

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