Skip to content

Commit 199aa47

Browse files
committed
Set up files.
1 parent 5412428 commit 199aa47

38 files changed

+12882
-0
lines changed

.github/ci.yml

Whitespace-only changes.

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Ignore documentation output.
2+
**/docs/**/output/*
3+
4+
# Ignore CMake build directory.
5+
build/
6+
7+
# Ignore build artifacts
8+
*.o
9+
10+
# Ignore code coverage artifacts
11+
*.gcda
12+
*.gcno
13+
*.gcov

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test/unit-test/CMock"]
2+
path = test/unit-test/CMock
3+
url = [email protected]:ThrowTheSwitch/CMock.git

README

Whitespace-only changes.

docs/doxygen/config.doxyfile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Include common configuration options.
2+
@INCLUDE_PATH = doc/config
3+
@INCLUDE = common
4+
5+
# Basic project information.
6+
PROJECT_NAME = "PKCS #11"
7+
PROJECT_BRIEF = "PKCS #11 Cryptoki Library"
8+
9+
# Library documentation output directory.
10+
HTML_OUTPUT = pkcs11
11+
12+
# Generate Doxygen tag file for this library.
13+
GENERATE_TAGFILE = doc/output/pkcs11.tag
14+
ENABLE_PREPROCESSING = YES
15+
MACRO_EXPANSION = YES
16+
PREDEFINED="CK_DECLARE_FUNCTION(return, name)=return name"
17+
18+
# Directories containing library source code.
19+
INPUT = doc \
20+
doc/lib \
21+
libraries/3rdparty/pkcs11 \
22+
libraries/abstractions/pkcs11 \
23+
libraries/freertos_plus/standard/pkcs11/include \
24+
libraries/abstractions/pkcs11/mbedtls \
25+
libraries/abstractions/pkcs11/include \
26+
libraries/freertos_plus/standard/utils/include/ \
27+
28+
# Library file names.
29+
FILE_PATTERNS = *pkcs*.c *pkcs*.h *pkcs*.txt *pki*.c *pki*.h
30+
31+
TAGFILES = doc/output/main.tag=../main
32+

docs/doxygen/layout.xml

+228
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
<doxygenlayout version="1.0">
2+
<!-- Generated by doxygen 1.8.20 -->
3+
<!-- Navigation index tabs for HTML output -->
4+
<navindex>
5+
<tab type="mainpage" visible="yes" title=""/>
6+
<tab type="pages" visible="yes" title="" intro=""/>
7+
<!-- Hide the default "Data Structures" tab and use the "Modules" tab for data
8+
structures. This allows internal data structures to be hidden. -->
9+
<tab type="modules" visible="yes" title="Data types and Constants" intro="This library defines the following data types and constants."/>
10+
<tab type="namespaces" visible="yes" title="">
11+
<tab type="namespacelist" visible="yes" title="" intro=""/>
12+
<tab type="namespacemembers" visible="yes" title="" intro=""/>
13+
</tab>
14+
<tab type="interfaces" visible="no" title="">
15+
<tab type="interfacelist" visible="no" title="" intro=""/>
16+
<tab type="interfaceindex" visible="no" title=""/>
17+
<tab type="interfacehierarchy" visible="yes" title="" intro=""/>
18+
</tab>
19+
<tab type="classes" visible="no" title="">
20+
<tab type="classlist" visible="no" title="" intro=""/>
21+
<tab type="classindex" visible="no" title=""/>
22+
<tab type="hierarchy" visible="no" title="" intro=""/>
23+
<tab type="classmembers" visible="no" title="" intro=""/>
24+
</tab>
25+
<tab type="structs" visible="no" title="">
26+
<tab type="structlist" visible="no" title="" intro=""/>
27+
<tab type="structindex" visible="no" title=""/>
28+
</tab>
29+
<tab type="exceptions" visible="no" title="">
30+
<tab type="exceptionlist" visible="no" title="" intro=""/>
31+
<tab type="exceptionindex" visible="no" title=""/>
32+
<tab type="exceptionhierarchy" visible="yes" title="" intro=""/>
33+
</tab>
34+
<tab type="files" visible="no" title="">
35+
<tab type="filelist" visible="yes" title="Files" intro="The following files are associated with this library."/>
36+
<tab type="globals" visible="no" title="" intro=""/>
37+
</tab>
38+
<tab type="examples" visible="yes" title="" intro=""/>
39+
</navindex>
40+
41+
<!-- Layout definition for a class page -->
42+
<class>
43+
<briefdescription visible="yes"/>
44+
<includes visible="$SHOW_INCLUDE_FILES"/>
45+
<inheritancegraph visible="$CLASS_GRAPH"/>
46+
<collaborationgraph visible="$COLLABORATION_GRAPH"/>
47+
<memberdecl>
48+
<nestedclasses visible="yes" title=""/>
49+
<publictypes title=""/>
50+
<services title=""/>
51+
<interfaces title=""/>
52+
<publicslots title=""/>
53+
<signals title=""/>
54+
<publicmethods title=""/>
55+
<publicstaticmethods title=""/>
56+
<publicattributes title=""/>
57+
<publicstaticattributes title=""/>
58+
<protectedtypes title=""/>
59+
<protectedslots title=""/>
60+
<protectedmethods title=""/>
61+
<protectedstaticmethods title=""/>
62+
<protectedattributes title=""/>
63+
<protectedstaticattributes title=""/>
64+
<packagetypes title=""/>
65+
<packagemethods title=""/>
66+
<packagestaticmethods title=""/>
67+
<packageattributes title=""/>
68+
<packagestaticattributes title=""/>
69+
<properties title=""/>
70+
<events title=""/>
71+
<privatetypes title=""/>
72+
<privateslots title=""/>
73+
<privatemethods title=""/>
74+
<privatestaticmethods title=""/>
75+
<privateattributes title=""/>
76+
<privatestaticattributes title=""/>
77+
<friends title=""/>
78+
<related title="" subtitle=""/>
79+
<membergroups visible="yes"/>
80+
</memberdecl>
81+
<detaileddescription title=""/>
82+
<memberdef>
83+
<inlineclasses title=""/>
84+
<typedefs title=""/>
85+
<enums title=""/>
86+
<services title=""/>
87+
<interfaces title=""/>
88+
<constructors title=""/>
89+
<functions title=""/>
90+
<related title=""/>
91+
<variables title=""/>
92+
<properties title=""/>
93+
<events title=""/>
94+
</memberdef>
95+
<allmemberslink visible="yes"/>
96+
<usedfiles visible="$SHOW_USED_FILES"/>
97+
<authorsection visible="yes"/>
98+
</class>
99+
100+
<!-- Layout definition for a namespace page -->
101+
<namespace>
102+
<briefdescription visible="yes"/>
103+
<memberdecl>
104+
<nestednamespaces visible="yes" title=""/>
105+
<constantgroups visible="yes" title=""/>
106+
<interfaces visible="yes" title=""/>
107+
<classes visible="yes" title=""/>
108+
<structs visible="yes" title=""/>
109+
<exceptions visible="yes" title=""/>
110+
<typedefs title=""/>
111+
<sequences title=""/>
112+
<dictionaries title=""/>
113+
<enums title=""/>
114+
<functions title=""/>
115+
<variables title=""/>
116+
<membergroups visible="yes"/>
117+
</memberdecl>
118+
<detaileddescription title=""/>
119+
<memberdef>
120+
<inlineclasses title=""/>
121+
<typedefs title=""/>
122+
<sequences title=""/>
123+
<dictionaries title=""/>
124+
<enums title=""/>
125+
<functions title=""/>
126+
<variables title=""/>
127+
</memberdef>
128+
<authorsection visible="yes"/>
129+
</namespace>
130+
131+
<!-- Layout definition for a file page -->
132+
<file>
133+
<briefdescription visible="yes"/>
134+
<includes visible="$SHOW_INCLUDE_FILES"/>
135+
<includegraph visible="$INCLUDE_GRAPH"/>
136+
<includedbygraph visible="$INCLUDED_BY_GRAPH"/>
137+
<sourcelink visible="yes"/>
138+
<memberdecl>
139+
<interfaces visible="yes" title=""/>
140+
<classes visible="yes" title=""/>
141+
<structs visible="yes" title=""/>
142+
<exceptions visible="yes" title=""/>
143+
<namespaces visible="yes" title=""/>
144+
<constantgroups visible="yes" title=""/>
145+
<defines title=""/>
146+
<typedefs title=""/>
147+
<sequences title=""/>
148+
<dictionaries title=""/>
149+
<enums title=""/>
150+
<functions title=""/>
151+
<variables title=""/>
152+
<membergroups visible="yes"/>
153+
</memberdecl>
154+
<detaileddescription title=""/>
155+
<memberdef>
156+
<inlineclasses title=""/>
157+
<defines title=""/>
158+
<typedefs title=""/>
159+
<sequences title=""/>
160+
<dictionaries title=""/>
161+
<enums title=""/>
162+
<functions title=""/>
163+
<variables title=""/>
164+
</memberdef>
165+
<authorsection/>
166+
</file>
167+
168+
<!-- Layout definition for a group page -->
169+
<group>
170+
<briefdescription visible="yes"/>
171+
<groupgraph visible="$GROUP_GRAPHS"/>
172+
<memberdecl>
173+
<nestedgroups visible="yes" title=""/>
174+
<dirs visible="yes" title=""/>
175+
<files visible="yes" title=""/>
176+
<namespaces visible="yes" title=""/>
177+
<classes visible="yes" title=""/>
178+
<defines title=""/>
179+
<typedefs title=""/>
180+
<sequences title=""/>
181+
<dictionaries title=""/>
182+
<enums title=""/>
183+
<enumvalues title=""/>
184+
<functions title=""/>
185+
<variables title=""/>
186+
<signals title=""/>
187+
<publicslots title=""/>
188+
<protectedslots title=""/>
189+
<privateslots title=""/>
190+
<events title=""/>
191+
<properties title=""/>
192+
<friends title=""/>
193+
<membergroups visible="yes"/>
194+
</memberdecl>
195+
<detaileddescription title=""/>
196+
<memberdef>
197+
<pagedocs/>
198+
<inlineclasses title=""/>
199+
<defines title=""/>
200+
<typedefs title=""/>
201+
<sequences title=""/>
202+
<dictionaries title=""/>
203+
<enums title=""/>
204+
<enumvalues title=""/>
205+
<functions title=""/>
206+
<variables title=""/>
207+
<signals title=""/>
208+
<publicslots title=""/>
209+
<protectedslots title=""/>
210+
<privateslots title=""/>
211+
<events title=""/>
212+
<properties title=""/>
213+
<friends title=""/>
214+
</memberdef>
215+
<authorsection visible="yes"/>
216+
</group>
217+
218+
<!-- Layout definition for a directory page -->
219+
<directory>
220+
<briefdescription visible="yes"/>
221+
<directorygraph visible="yes"/>
222+
<memberdecl>
223+
<dirs visible="yes"/>
224+
<files visible="yes"/>
225+
</memberdecl>
226+
<detaileddescription title=""/>
227+
</directory>
228+
</doxygenlayout>

docs/doxygen/pages.txt

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Include common configuration options.
2+
@INCLUDE_PATH = doc/config
3+
@INCLUDE = common
4+
5+
# Basic project information.
6+
PROJECT_NAME = "PKCS #11"
7+
PROJECT_BRIEF = "PKCS #11 Cryptoki Library"
8+
9+
# Library documentation output directory.
10+
HTML_OUTPUT = pkcs11
11+
12+
# Generate Doxygen tag file for this library.
13+
GENERATE_TAGFILE = doc/output/pkcs11.tag
14+
ENABLE_PREPROCESSING = YES
15+
MACRO_EXPANSION = YES
16+
PREDEFINED="CK_DECLARE_FUNCTION(return, name)=return name"
17+
18+
# Directories containing library source code.
19+
INPUT = doc \
20+
doc/lib \
21+
libraries/3rdparty/pkcs11 \
22+
libraries/abstractions/pkcs11 \
23+
libraries/freertos_plus/standard/pkcs11/include \
24+
libraries/abstractions/pkcs11/mbedtls \
25+
libraries/abstractions/pkcs11/include \
26+
libraries/freertos_plus/standard/utils/include/ \
27+
28+
# Library file names.
29+
FILE_PATTERNS = *pkcs*.c *pkcs*.h *pkcs*.txt *pki*.c *pki*.h
30+
31+
TAGFILES = doc/output/main.tag=../main
32+

docs/doxygen/pkcs11_digest.png

45.2 KB
Loading

docs/doxygen/pkcs11_digest.pu

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@startuml
2+
skinparam classFontSize 8
3+
skinparam classFontName Helvetica
4+
autonumber
5+
6+
participant "Application" as app
7+
participant "PKCS #11" as pkcs
8+
9+
box "PKCS #11 - Creating A Message Digest" #LightBlue
10+
participant app
11+
participant pkcs
12+
end box
13+
14+
app -> pkcs: Acquire function list with C_GetFunctionList
15+
pkcs -> app: Return CK_FUNCTION_LIST_PTR with supported functions
16+
17+
app -> pkcs: Initialize with C_Initialize
18+
19+
app -> pkcs: Query for a slot with C_GetSlotList
20+
pkcs -> app: Return an array of CK_SLOT_IDs
21+
22+
app -> pkcs: Open a new session with a slot using C_OpenSession
23+
pkcs -> app: Return a CK_SESSION_HANDLE
24+
25+
app -> pkcs: Log in to current session with C_Login
26+
27+
app -> pkcs: Query for supported mechanisms with C_GetMechanismInfo
28+
pkcs -> app: Return CK_MECHANISM_INFO
29+
30+
app -> pkcs: Start a digest operation using SHA-256 by passing CKM_SHA256 to C_DigestInit
31+
app -> pkcs: Pass bytes buffer of message to C_DigestUpdate
32+
app -> pkcs: Pass bytes buffer for storing the digest to C_DigestFinal
33+
pkcs -> app: Fill buffer with digest bytes
34+
35+
app -> pkcs: Close session with C_CloseSession
36+
app -> pkcs: Uninitialize with C_Finalize
37+
38+
@enduml
34.7 KB
Loading
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
@startuml
2+
skinparam classFontSize 8
3+
skinparam classFontName Helvetica
4+
autonumber
5+
6+
participant "Application" as app
7+
participant "PKCS #11" as pkcs
8+
9+
box "PKCS #11 - Generating A Key Pair" #LightBlue
10+
participant app
11+
participant pkcs
12+
end box
13+
14+
app -> pkcs: Acquire function list with C_GetFunctionList
15+
pkcs -> app: Return CK_FUNCTION_LIST_PTR with supported functions
16+
17+
app -> pkcs: Initialize with C_Initialize
18+
19+
app -> pkcs: Query for a slot with C_GetSlotList
20+
pkcs -> app: Return an array of CK_SLOT_IDs
21+
22+
app -> pkcs: Open a new session with a slot using C_OpenSession
23+
pkcs -> app: Return a CK_SESSION_HANDLE
24+
25+
app -> pkcs: Log in to current session with C_Login
26+
27+
app -> pkcs: Pass CK_ATTRIBUTEs template to C_CreateKeyPair
28+
pkcs -> app: Return CK_OBJECT_HANDLE for public key and for private key
29+
30+
app -> pkcs: Close session with C_CloseSession
31+
app -> pkcs: Uninitialize with C_Finalize
32+
33+
@endumlf

docs/doxygen/pkcs11_object_import.png

34.7 KB
Loading

0 commit comments

Comments
 (0)