Documentation
¶
Overview ¶
Package signedplugin makes it easier to use code signing certificates (RSA) to sign plugins. It uses file locking to prevent TOCTOU vulnerabilities between the time of verifying the file signature and loading the plugin from disk. It allows plugin authors to create ECDSA signed SHA3-256 hashes of plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrLockFailed is returned when locking a plugin fails. ErrLockFailed = errors.New("failed to acquire lock on plugin") //ErrSignatureValidationFailed is returned when a plugin does not match its expected signature. ErrSignatureValidationFailed = errors.New("plugin and signature do not match") )
Functions ¶
func Open ¶
Open loads a plugin from disk and verifies that its SHA3-256 hash was signed by the expected public key. This implementation does not care where the public key or signature come from, allowing callers to load them from disk, a database or a website. It is vital that public keys and signatures are loaded securely, otherwise an attacker will be able to circumvent the entire scheme.
Types ¶
This section is empty.