Skip to content

dmjones/crypto11-28

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Example code for ThalesGroup/crypto11#28

Instructions to build:

docker build . -t crypto11-test
docker volume create tokens
docker run --mount src=tokens,dst=/tokens crypto11-test

This will generate a key and output the label, e.g.

$ docker run --mount src=tokens,dst=/tokens crypto11-test
2019/02/25 14:13:03 Generating key...
2019/02/25 14:13:03 Generated key: 446552704e335a5870636a69747a70364c695f3569633243496c7035494279475858454768305145344c593d0000000000000000000000000000000000000000

Then run it again, passing the label as an argument. You will get a slot ID warning, but that's just due to my lazy script writing.

$ docker run --mount src=tokens,dst=/tokens crypto11-test 446552704e335a5870636a69747a70364c695f3569633243496c7035494279475858454768305145344c593d0000000000000000000000000000000000000000
CKR_SLOT_ID_INVALID: Slot 0 does not exist.
2019/02/25 14:13:54 Found key

About

Example code for issue #28

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published