Skip to content

feat: export the PluginPrimitiveSigner to enable signing with PKCS#7#572

Open
dallasd1 wants to merge 2 commits intonotaryproject:mainfrom
dallasd1:dadelan/export-primitive-signer
Open

feat: export the PluginPrimitiveSigner to enable signing with PKCS#7#572
dallasd1 wants to merge 2 commits intonotaryproject:mainfrom
dallasd1:dadelan/export-primitive-signer

Conversation

@dallasd1
Copy link

@dallasd1 dallasd1 commented Mar 12, 2026

Type PluginPrimitiveSigner is needed for generating PKCS#7 signatures by code living in the notation CLI repo. That new (CLI) logic bypasses the PluginSigner wrapper that JWS and COSE use. This change exports the type to make it available outside of the notation-go repo and additionally adds helper functions for external callers.

The default behavior in the signing path for JWS/COSE when calling generateSignature remains unchanged.

Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
…cFromPlugin

Signed-off-by: Dallas Delaney <dadelan@microsoft.com>
}

// GetKeySpecFromPlugin retrieves the key specification from a plugin by calling DescribeKey.
func GetKeySpecFromPlugin(ctx context.Context, p plugin.SignPlugin, keyID string, pluginConfig map[string]string) (signature.KeySpec, error) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for the CLI PR that will pull the signing type to include in the PKCS#7 envelope

@dallasd1 dallasd1 changed the title Export the PluginPrimitiveSigner to enable signing with PKCS#7 feat: export the PluginPrimitiveSigner to enable signing with PKCS#7 Mar 18, 2026
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

Successfully merging this pull request may close these issues.

1 participant