FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
wolfPKCS11/examples/examples.test at master · wolfSSL/wolfPKCS11 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
wolfSSL
/
wolfPKCS11
Public
Notifications
You must be signed in to change notification settings
Fork
29
Star
24
Code
Issues
0
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
wolfPKCS11
/
examples
/
examples.test
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
85 lines (66 loc) · 2.48 KB
Breadcrumbs
wolfPKCS11
/
examples
/
examples.test
Copy path
File metadata and controls
executable file
·
85 lines (66 loc) · 2.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!
/usr/bin/env bash
#
Test the examples.
#
Initialize the token and setup passwords.
./examples/init_token
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nInitialization of token failed
"
&&
exit
1
#
Get the slot information and display
./examples/slot_info
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nGetting slot information failed
"
&&
exit
1
#
Get the token information and display
./examples/token_info
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nGetting token information failed
"
&&
exit
1
#
Get information on mechanisms and display.
./examples/mech_info
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nGetting mechanism information failed
"
&&
exit
1
#
Add an AES key to the session
./examples/add_aes_key
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an AES key failed
"
&&
exit
1
#
Add an AES key to the token
./examples/add_aes_key -privId
"
aes-128
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an AES key to the token failed
"
&&
exit
1
#
Add an HMAC key to the session
./examples/add_hmac_key
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an HMAC key failed
"
&&
exit
1
#
Add an HMAC key to the token
./examples/add_hmac_key -privId
"
hmac-256
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an HMAC key to the token failed
"
&&
exit
1
#
Add an RSA key to the session
./examples/add_rsa_key
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an RSA key failed
"
&&
exit
1
#
Add an RSA key to the token
./examples/add_rsa_key -privId
"
rsa-2048
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an RSA key to the token failed
"
&&
exit
1
#
Locate the RSA DER file. It is a distributed source file, so for VPATH
#
builds (e.g. "make distcheck") it lives in $srcdir, not the build tree.
RSA_DER=
"
${srcdir
:-
.}
/examples/rsa-2048.der
"
#
Add an RSA key from file to the session
./examples/add_rsa_key_file -rsa
"
$RSA_DER
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an RSA key from file failed
"
&&
exit
1
#
Add an RSA key to the token
./examples/add_rsa_key_file -privId
"
rsa-2048.der
"
-rsa
"
$RSA_DER
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding an RSA key from file to the token failed
"
&&
exit
1
#
Add a cert to the session
./examples/add_cert
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding a certificate failed
"
&&
exit
1
#
Add a cert to the token
./examples/add_cert -privId
"
cert-2048
"
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nAdding a certificate to the token failed
"
&&
exit
1
#
Show all objects on token
./examples/obj_list
RESULT=
$?
[
$RESULT
-ne
0 ]
&&
echo
"
\n\nShowing objects stored on token failed
"
&&
exit
1
exit
0
Back
|
FazBrowse Home
|
New Git URL