Documentation ¶
Index ¶
- Variables
- func CreateAESKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)
- func CreateECDSAKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)
- func Execute()
- func ExitWithMessage(message string, err error)
- func ImportAESKey(p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)
- func LoginPkcs11() (p *pkcs11.Ctx, session pkcs11.SessionHandle, sindex int)
- func PrintPkcs11Settings()
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 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.
Click to show internal directories.
Click to hide internal directories.