cmd

package
v0.0.0-...-44e006c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "pkcs11-test",
	Short: "A Simple PKCS11 Utility/Tool for Testing PKCS11.",
	Long: `This tool is meant to be able to create AES and ECDSA objects for testing purposes.
	`,
}

RootCmd represents the base command when called without any subcommands

Functions

func CreateAESKey

func CreateAESKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)

Creates an AES key object then tests mechanism CKM_SHA256_HMAC with it

func CreateECDSAKey

func CreateECDSAKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)

Creates an ECDSA key object then tests mechanism CKM_SHA256_HMAC with it

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func ExitWithMessage

func ExitWithMessage(message string, err error)

Exit with message and code 1

func ImportAESKey

func ImportAESKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)

Creates an AES key object then tests mechanism CKM_SHA256_HMAC with it

func LoginPkcs11

func LoginPkcs11() (p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)

Loads the PKCS11 library and performs a login

func PrintPkcs11Settings

func PrintPkcs11Settings()

Types

This section is empty.

Jump to

Keyboard shortcuts

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