@super-protocol/addons-tee 0.8.16 → 0.8.17-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +1 -1
  2. package/bindings/amd-sev-snp-napi-rs/amd-sev-snp-napi-rs.linux-x64-gnu.node +0 -0
  3. package/bindings/amd-sev-snp-napi-rs/index.d.ts +24 -0
  4. package/bindings/amd-sev-snp-napi-rs/index.js +328 -0
  5. package/bindings/amd-sev-snp-napi-rs/package-lock.json +40 -0
  6. package/bindings/amd-sev-snp-napi-rs/package.json +31 -0
  7. package/bindings/sgx-native/build/Release/sgx_native.node +0 -0
  8. package/bindings/sp-sev/.github/auto_assign-issues.yml +5 -0
  9. package/bindings/sp-sev/.github/auto_assign.yml +21 -0
  10. package/bindings/sp-sev/.github/dependabot.yml +6 -0
  11. package/bindings/sp-sev/.github/workflows/dco.yml +10 -0
  12. package/bindings/sp-sev/.github/workflows/lint.yml +56 -0
  13. package/bindings/sp-sev/.github/workflows/test.yml +54 -0
  14. package/bindings/sp-sev/.rustfmt.toml +2 -0
  15. package/bindings/sp-sev/CODEOWNERS +1 -0
  16. package/bindings/sp-sev/Cargo.lock +2221 -0
  17. package/bindings/sp-sev/Cargo.toml +80 -0
  18. package/bindings/sp-sev/LICENSE +201 -0
  19. package/bindings/sp-sev/README.md +82 -0
  20. package/bindings/sp-sev/build.rs +17 -0
  21. package/bindings/sp-sev/docs/attestation/README.md +239 -0
  22. package/bindings/sp-sev/docs/attestation/certchain.dot +14 -0
  23. package/bindings/sp-sev/docs/attestation/certchain.dot.png +0 -0
  24. package/bindings/sp-sev/docs/attestation/prerequisites.md +6 -0
  25. package/bindings/sp-sev/docs/attestation/process.msc +60 -0
  26. package/bindings/sp-sev/docs/attestation/process.msc.png +0 -0
  27. package/bindings/sp-sev/docs/attestation/protections.md +53 -0
  28. package/bindings/sp-sev/package-version.py +11 -0
  29. package/bindings/sp-sev/tests/api.rs +191 -0
  30. package/bindings/sp-sev/tests/certs.rs +143 -0
  31. package/bindings/sp-sev/tests/certs_data/cert_chain_milan +74 -0
  32. package/bindings/sp-sev/tests/certs_data/cert_chain_turin +74 -0
  33. package/bindings/sp-sev/tests/certs_data/report_milan.hex +1 -0
  34. package/bindings/sp-sev/tests/certs_data/vcek_milan.der +0 -0
  35. package/bindings/sp-sev/tests/certs_data/vcek_turin.der +0 -0
  36. package/bindings/sp-sev/tests/guest.rs +56 -0
  37. package/bindings/sp-sev/tests/id-block.rs +168 -0
  38. package/bindings/sp-sev/tests/measurement/ovmf_AmdSev_suffix.bin +0 -0
  39. package/bindings/sp-sev/tests/measurement/ovmf_OvmfX64_suffix.bin +0 -0
  40. package/bindings/sp-sev/tests/measurement/test_auth_block.bin +0 -0
  41. package/bindings/sp-sev/tests/measurement/test_auth_key.pem +6 -0
  42. package/bindings/sp-sev/tests/measurement/test_auth_sig.bin +0 -0
  43. package/bindings/sp-sev/tests/measurement/test_id_key.pem +6 -0
  44. package/bindings/sp-sev/tests/measurement/test_id_sig.bin +0 -0
  45. package/bindings/sp-sev/tests/measurement.rs +510 -0
  46. package/bindings/sp-sev/tests/naples/ark.cert.bad +0 -0
  47. package/bindings/sp-sev/tests/naples/ark.cert.sig +0 -0
  48. package/bindings/sp-sev/tests/naples/ark.rs +38 -0
  49. package/bindings/sp-sev/tests/naples/ask.rs +29 -0
  50. package/bindings/sp-sev/tests/naples/cek.cert +0 -0
  51. package/bindings/sp-sev/tests/naples/cek.rs +30 -0
  52. package/bindings/sp-sev/tests/naples/mod.rs +20 -0
  53. package/bindings/sp-sev/tests/naples/oca.cert +0 -0
  54. package/bindings/sp-sev/tests/naples/oca.rs +45 -0
  55. package/bindings/sp-sev/tests/naples/pdh.cert +0 -0
  56. package/bindings/sp-sev/tests/naples/pdh.rs +28 -0
  57. package/bindings/sp-sev/tests/naples/pek.cert +0 -0
  58. package/bindings/sp-sev/tests/naples/pek.rs +32 -0
  59. package/bindings/sp-sev/tests/rome/ark.rs +33 -0
  60. package/bindings/sp-sev/tests/rome/ask.rs +29 -0
  61. package/bindings/sp-sev/tests/rome/cek.cert +0 -0
  62. package/bindings/sp-sev/tests/rome/cek.rs +29 -0
  63. package/bindings/sp-sev/tests/rome/mod.rs +16 -0
  64. package/bindings/sp-sev/tests/rome/oca.cert +0 -0
  65. package/bindings/sp-sev/tests/rome/oca.rs +45 -0
  66. package/bindings/sp-sev/tests/rome/pdh.cert +0 -0
  67. package/bindings/sp-sev/tests/rome/pdh.rs +28 -0
  68. package/bindings/sp-sev/tests/rome/pek.cert +0 -0
  69. package/bindings/sp-sev/tests/rome/pek.rs +32 -0
  70. package/bindings/sp-sev/tests/session.rs +39 -0
  71. package/bindings/sp-sev/tests/sev_launch.rs +120 -0
  72. package/bindings/sp-sev/tests/snp_launch.rs +108 -0
  73. package/bindings/utils/virtee/LICENSE +201 -0
  74. package/bindings/utils/virtee/libsev.so +0 -0
  75. package/bindings/utils/virtee/snpguest +0 -0
  76. package/dist/sgx-native-module/consts.d.ts +1 -1
  77. package/dist/sgx-native-module/consts.js +4 -4
  78. package/dist/sgx-native-module/dcap-quote-verify.service.js +1 -1
  79. package/dist/sgx-native-module/enclave.service.d.ts +5 -4
  80. package/dist/sgx-native-module/enclave.service.js +1 -1
  81. package/dist/sgx-native-module/errors.js +1 -1
  82. package/dist/sgx-native-module/index.d.ts +2 -0
  83. package/dist/sgx-native-module/index.js +3 -1
  84. package/dist/sgx-native-module/pki.service.d.ts +2 -2
  85. package/dist/sgx-native-module/pki.service.js +4 -4
  86. package/dist/sgx-native-module/sev-snp-mrenclave.d.ts +63 -0
  87. package/dist/sgx-native-module/sev-snp-mrenclave.js +290 -0
  88. package/dist/sgx-native-module/sev-snp.d.ts +134 -0
  89. package/dist/sgx-native-module/sev-snp.js +534 -0
  90. package/package.json +21 -14
  91. package/dist/sgx-native-module/sgx-tests.d.ts +0 -1
  92. package/dist/sgx-native-module/sgx-tests.js +0 -114
  93. package/dist/sgx-native-module/tdx-tests.d.ts +0 -1
  94. package/dist/sgx-native-module/tdx-tests.js +0 -64
package/README.md CHANGED
@@ -4,5 +4,5 @@ Addons for Trusted Execution Environment
4
4
  Use it for low-level actions with SGX things.
5
5
 
6
6
  To build npm package:
7
- 1. Compile "native" part with run bindings/build-sgx-native.sh
7
+ 1. Compile "native" part with run bindings/build_in_docker.sh
8
8
  2. npm install && npm run build
@@ -0,0 +1,24 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /* auto-generated by NAPI-RS */
5
+
6
+ export const SNP_REPORT_DATA_SIZE: number
7
+ export const KDS_CERT_SITE: string
8
+ export const KDS_VCEK: string
9
+ export const SHA256_BUFFER_SIZE: number
10
+ export interface CpuInfo {
11
+ family: number
12
+ model: number
13
+ stepping: number
14
+ }
15
+ export declare function getSnpReport(data: Buffer, vmpl: number): Buffer
16
+ export declare function getVcekKdsUrl(report: Buffer, generation: string): string
17
+ export declare function getReportData(report: Buffer): Buffer
18
+ export declare function getReportMeasure(report: Buffer): Buffer
19
+ export declare function getReportVmpl(report: Buffer): number
20
+ export declare function getReportPolicy(report: Buffer): bigint
21
+ export declare function getCpuInfo(): CpuInfo
22
+ export declare function getCpuSig(cpuInfo: CpuInfo): number
23
+ export declare function getLogicalCoresCount(): number
24
+ export declare function calcSnpMeasure(ovmfPath: string, kernelSha256: Buffer, initrdSha256: Buffer, cmdlineSha256: Buffer, vcpuSig: number, vcpuCount: number): Buffer
@@ -0,0 +1,328 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /* prettier-ignore */
4
+
5
+ /* auto-generated by NAPI-RS */
6
+
7
+ const { existsSync, readFileSync } = require('fs')
8
+ const { join } = require('path')
9
+
10
+ const { platform, arch } = process
11
+
12
+ let nativeBinding = null
13
+ let localFileExisted = false
14
+ let loadError = null
15
+
16
+ function isMusl() {
17
+ // For Node 10
18
+ if (!process.report || typeof process.report.getReport !== 'function') {
19
+ try {
20
+ const lddPath = require('child_process').execSync('which ldd').toString().trim()
21
+ return readFileSync(lddPath, 'utf8').includes('musl')
22
+ } catch (e) {
23
+ return true
24
+ }
25
+ } else {
26
+ const { glibcVersionRuntime } = process.report.getReport().header
27
+ return !glibcVersionRuntime
28
+ }
29
+ }
30
+
31
+ switch (platform) {
32
+ case 'android':
33
+ switch (arch) {
34
+ case 'arm64':
35
+ localFileExisted = existsSync(join(__dirname, 'amd-sev-snp-napi-rs.android-arm64.node'))
36
+ try {
37
+ if (localFileExisted) {
38
+ nativeBinding = require('./amd-sev-snp-napi-rs.android-arm64.node')
39
+ } else {
40
+ nativeBinding = require('amd-sev-snp-napi-rs-android-arm64')
41
+ }
42
+ } catch (e) {
43
+ loadError = e
44
+ }
45
+ break
46
+ case 'arm':
47
+ localFileExisted = existsSync(join(__dirname, 'amd-sev-snp-napi-rs.android-arm-eabi.node'))
48
+ try {
49
+ if (localFileExisted) {
50
+ nativeBinding = require('./amd-sev-snp-napi-rs.android-arm-eabi.node')
51
+ } else {
52
+ nativeBinding = require('amd-sev-snp-napi-rs-android-arm-eabi')
53
+ }
54
+ } catch (e) {
55
+ loadError = e
56
+ }
57
+ break
58
+ default:
59
+ throw new Error(`Unsupported architecture on Android ${arch}`)
60
+ }
61
+ break
62
+ case 'win32':
63
+ switch (arch) {
64
+ case 'x64':
65
+ localFileExisted = existsSync(
66
+ join(__dirname, 'amd-sev-snp-napi-rs.win32-x64-msvc.node')
67
+ )
68
+ try {
69
+ if (localFileExisted) {
70
+ nativeBinding = require('./amd-sev-snp-napi-rs.win32-x64-msvc.node')
71
+ } else {
72
+ nativeBinding = require('amd-sev-snp-napi-rs-win32-x64-msvc')
73
+ }
74
+ } catch (e) {
75
+ loadError = e
76
+ }
77
+ break
78
+ case 'ia32':
79
+ localFileExisted = existsSync(
80
+ join(__dirname, 'amd-sev-snp-napi-rs.win32-ia32-msvc.node')
81
+ )
82
+ try {
83
+ if (localFileExisted) {
84
+ nativeBinding = require('./amd-sev-snp-napi-rs.win32-ia32-msvc.node')
85
+ } else {
86
+ nativeBinding = require('amd-sev-snp-napi-rs-win32-ia32-msvc')
87
+ }
88
+ } catch (e) {
89
+ loadError = e
90
+ }
91
+ break
92
+ case 'arm64':
93
+ localFileExisted = existsSync(
94
+ join(__dirname, 'amd-sev-snp-napi-rs.win32-arm64-msvc.node')
95
+ )
96
+ try {
97
+ if (localFileExisted) {
98
+ nativeBinding = require('./amd-sev-snp-napi-rs.win32-arm64-msvc.node')
99
+ } else {
100
+ nativeBinding = require('amd-sev-snp-napi-rs-win32-arm64-msvc')
101
+ }
102
+ } catch (e) {
103
+ loadError = e
104
+ }
105
+ break
106
+ default:
107
+ throw new Error(`Unsupported architecture on Windows: ${arch}`)
108
+ }
109
+ break
110
+ case 'darwin':
111
+ localFileExisted = existsSync(join(__dirname, 'amd-sev-snp-napi-rs.darwin-universal.node'))
112
+ try {
113
+ if (localFileExisted) {
114
+ nativeBinding = require('./amd-sev-snp-napi-rs.darwin-universal.node')
115
+ } else {
116
+ nativeBinding = require('amd-sev-snp-napi-rs-darwin-universal')
117
+ }
118
+ break
119
+ } catch {}
120
+ switch (arch) {
121
+ case 'x64':
122
+ localFileExisted = existsSync(join(__dirname, 'amd-sev-snp-napi-rs.darwin-x64.node'))
123
+ try {
124
+ if (localFileExisted) {
125
+ nativeBinding = require('./amd-sev-snp-napi-rs.darwin-x64.node')
126
+ } else {
127
+ nativeBinding = require('amd-sev-snp-napi-rs-darwin-x64')
128
+ }
129
+ } catch (e) {
130
+ loadError = e
131
+ }
132
+ break
133
+ case 'arm64':
134
+ localFileExisted = existsSync(
135
+ join(__dirname, 'amd-sev-snp-napi-rs.darwin-arm64.node')
136
+ )
137
+ try {
138
+ if (localFileExisted) {
139
+ nativeBinding = require('./amd-sev-snp-napi-rs.darwin-arm64.node')
140
+ } else {
141
+ nativeBinding = require('amd-sev-snp-napi-rs-darwin-arm64')
142
+ }
143
+ } catch (e) {
144
+ loadError = e
145
+ }
146
+ break
147
+ default:
148
+ throw new Error(`Unsupported architecture on macOS: ${arch}`)
149
+ }
150
+ break
151
+ case 'freebsd':
152
+ if (arch !== 'x64') {
153
+ throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
154
+ }
155
+ localFileExisted = existsSync(join(__dirname, 'amd-sev-snp-napi-rs.freebsd-x64.node'))
156
+ try {
157
+ if (localFileExisted) {
158
+ nativeBinding = require('./amd-sev-snp-napi-rs.freebsd-x64.node')
159
+ } else {
160
+ nativeBinding = require('amd-sev-snp-napi-rs-freebsd-x64')
161
+ }
162
+ } catch (e) {
163
+ loadError = e
164
+ }
165
+ break
166
+ case 'linux':
167
+ switch (arch) {
168
+ case 'x64':
169
+ if (isMusl()) {
170
+ localFileExisted = existsSync(
171
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-x64-musl.node')
172
+ )
173
+ try {
174
+ if (localFileExisted) {
175
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-x64-musl.node')
176
+ } else {
177
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-x64-musl')
178
+ }
179
+ } catch (e) {
180
+ loadError = e
181
+ }
182
+ } else {
183
+ localFileExisted = existsSync(
184
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-x64-gnu.node')
185
+ )
186
+ try {
187
+ if (localFileExisted) {
188
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-x64-gnu.node')
189
+ } else {
190
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-x64-gnu')
191
+ }
192
+ } catch (e) {
193
+ loadError = e
194
+ }
195
+ }
196
+ break
197
+ case 'arm64':
198
+ if (isMusl()) {
199
+ localFileExisted = existsSync(
200
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-arm64-musl.node')
201
+ )
202
+ try {
203
+ if (localFileExisted) {
204
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-arm64-musl.node')
205
+ } else {
206
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-arm64-musl')
207
+ }
208
+ } catch (e) {
209
+ loadError = e
210
+ }
211
+ } else {
212
+ localFileExisted = existsSync(
213
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-arm64-gnu.node')
214
+ )
215
+ try {
216
+ if (localFileExisted) {
217
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-arm64-gnu.node')
218
+ } else {
219
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-arm64-gnu')
220
+ }
221
+ } catch (e) {
222
+ loadError = e
223
+ }
224
+ }
225
+ break
226
+ case 'arm':
227
+ if (isMusl()) {
228
+ localFileExisted = existsSync(
229
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-arm-musleabihf.node')
230
+ )
231
+ try {
232
+ if (localFileExisted) {
233
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-arm-musleabihf.node')
234
+ } else {
235
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-arm-musleabihf')
236
+ }
237
+ } catch (e) {
238
+ loadError = e
239
+ }
240
+ } else {
241
+ localFileExisted = existsSync(
242
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-arm-gnueabihf.node')
243
+ )
244
+ try {
245
+ if (localFileExisted) {
246
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-arm-gnueabihf.node')
247
+ } else {
248
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-arm-gnueabihf')
249
+ }
250
+ } catch (e) {
251
+ loadError = e
252
+ }
253
+ }
254
+ break
255
+ case 'riscv64':
256
+ if (isMusl()) {
257
+ localFileExisted = existsSync(
258
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-riscv64-musl.node')
259
+ )
260
+ try {
261
+ if (localFileExisted) {
262
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-riscv64-musl.node')
263
+ } else {
264
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-riscv64-musl')
265
+ }
266
+ } catch (e) {
267
+ loadError = e
268
+ }
269
+ } else {
270
+ localFileExisted = existsSync(
271
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-riscv64-gnu.node')
272
+ )
273
+ try {
274
+ if (localFileExisted) {
275
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-riscv64-gnu.node')
276
+ } else {
277
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-riscv64-gnu')
278
+ }
279
+ } catch (e) {
280
+ loadError = e
281
+ }
282
+ }
283
+ break
284
+ case 's390x':
285
+ localFileExisted = existsSync(
286
+ join(__dirname, 'amd-sev-snp-napi-rs.linux-s390x-gnu.node')
287
+ )
288
+ try {
289
+ if (localFileExisted) {
290
+ nativeBinding = require('./amd-sev-snp-napi-rs.linux-s390x-gnu.node')
291
+ } else {
292
+ nativeBinding = require('amd-sev-snp-napi-rs-linux-s390x-gnu')
293
+ }
294
+ } catch (e) {
295
+ loadError = e
296
+ }
297
+ break
298
+ default:
299
+ throw new Error(`Unsupported architecture on Linux: ${arch}`)
300
+ }
301
+ break
302
+ default:
303
+ throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
304
+ }
305
+
306
+ if (!nativeBinding) {
307
+ if (loadError) {
308
+ throw loadError
309
+ }
310
+ throw new Error(`Failed to load native binding`)
311
+ }
312
+
313
+ const { SNP_REPORT_DATA_SIZE, KDS_CERT_SITE, KDS_VCEK, SHA256_BUFFER_SIZE, getSnpReport, getVcekKdsUrl, getReportData, getReportMeasure, getReportVmpl, getReportPolicy, getCpuInfo, getCpuSig, getLogicalCoresCount, calcSnpMeasure } = nativeBinding
314
+
315
+ module.exports.SNP_REPORT_DATA_SIZE = SNP_REPORT_DATA_SIZE
316
+ module.exports.KDS_CERT_SITE = KDS_CERT_SITE
317
+ module.exports.KDS_VCEK = KDS_VCEK
318
+ module.exports.SHA256_BUFFER_SIZE = SHA256_BUFFER_SIZE
319
+ module.exports.getSnpReport = getSnpReport
320
+ module.exports.getVcekKdsUrl = getVcekKdsUrl
321
+ module.exports.getReportData = getReportData
322
+ module.exports.getReportMeasure = getReportMeasure
323
+ module.exports.getReportVmpl = getReportVmpl
324
+ module.exports.getReportPolicy = getReportPolicy
325
+ module.exports.getCpuInfo = getCpuInfo
326
+ module.exports.getCpuSig = getCpuSig
327
+ module.exports.getLogicalCoresCount = getLogicalCoresCount
328
+ module.exports.calcSnpMeasure = calcSnpMeasure
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "amd-sev-snp-napi-rs",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 2,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "amd-sev-snp-napi-rs",
9
+ "version": "1.0.0",
10
+ "license": "MIT",
11
+ "devDependencies": {
12
+ "@napi-rs/cli": "^2.18.4"
13
+ },
14
+ "engines": {
15
+ "node": ">= 16"
16
+ }
17
+ },
18
+ "node_modules/@napi-rs/cli": {
19
+ "version": "2.18.4",
20
+ "dev": true,
21
+ "license": "MIT",
22
+ "bin": {
23
+ "napi": "scripts/index.js"
24
+ },
25
+ "engines": {
26
+ "node": ">= 10"
27
+ },
28
+ "funding": {
29
+ "type": "github",
30
+ "url": "https://github.com/sponsors/Brooooooklyn"
31
+ }
32
+ }
33
+ },
34
+ "dependencies": {
35
+ "@napi-rs/cli": {
36
+ "version": "2.18.4",
37
+ "dev": true
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "amd-sev-snp-napi-rs",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "napi": {
7
+ "name": "amd-sev-snp-napi-rs",
8
+ "triples": {
9
+ "defaults": false,
10
+ "additional": [
11
+ "x86_64-unknown-linux-gnu"
12
+ ]
13
+ }
14
+ },
15
+ "license": "MIT",
16
+ "devDependencies": {
17
+ "@napi-rs/cli": "^2.18.4"
18
+ },
19
+ "engines": {
20
+ "node": ">= 16"
21
+ },
22
+ "scripts": {
23
+ "artifacts": "napi artifacts",
24
+ "build": "napi build --platform --release",
25
+ "build:debug": "napi build --platform",
26
+ "prepublishOnly": "napi prepublish -t npm",
27
+ "test": "ava",
28
+ "universal": "napi universal",
29
+ "version": "napi version"
30
+ }
31
+ }
@@ -0,0 +1,5 @@
1
+ addAssignees: true
2
+
3
+ assignees:
4
+ - tylerfanelli
5
+ - larrydewey
@@ -0,0 +1,21 @@
1
+ # Set to true to add reviewers to pull requests
2
+ addReviewers: true
3
+
4
+ # Set to true to add assignees to pull requests
5
+ addAssignees: true
6
+
7
+ # A list of reviewers to be added to pull requests (GitHub user name)
8
+ reviewers:
9
+ - DGonzalezVillal
10
+ - tylerfanelli
11
+ - larrydewey
12
+ - ryansavino
13
+
14
+ # A list of keywords to be skipped the process that add reviewers if pull requests include it
15
+ skipKeywords:
16
+ - wip
17
+ - WIP
18
+
19
+ # A number of reviewers added to the pull request
20
+ # Set 0 to add all the reviewers (default: 0)
21
+ numberOfReviewers: 2
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "cargo"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,10 @@
1
+ name: Sign-off Check
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ check:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: KineticCafe/actions-dco@v1
@@ -0,0 +1,56 @@
1
+ on: [push, pull_request]
2
+ name: lint
3
+ jobs:
4
+ fmt:
5
+ name: cargo fmt
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: dtolnay/rust-toolchain@stable
10
+ with:
11
+ components: rustfmt
12
+ toolchain: 1.80.0
13
+ - run: cargo fmt --all -- --check
14
+
15
+ clippy-openssl:
16
+ name: cargo clippy openssl
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: dtolnay/rust-toolchain@stable
21
+ with:
22
+ components: clippy
23
+ toolchain: 1.80.0
24
+ - run: cargo clippy --features=openssl,hw_tests,dangerous_hw_tests --all-targets -- -D clippy::all -D unused_imports -D warnings -D clippy::style
25
+
26
+ clippy-crypto_nossl:
27
+ name: cargo clippy crypto_nossl
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: dtolnay/rust-toolchain@stable
32
+ with:
33
+ components: clippy
34
+ toolchain: 1.80.0
35
+ - run: cargo clippy --features=crypto_nossl,hw_tests,dangerous_hw_tests --all-targets -- -D clippy::all -D unused_imports -D warnings -D clippy::style
36
+
37
+ readme:
38
+ name: cargo rdme
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ - uses: dtolnay/rust-toolchain@stable
43
+ with:
44
+ toolchain: nightly
45
+ - run: |
46
+ cargo install cargo-rdme
47
+ cargo rdme --check
48
+
49
+ check-spdx-headers:
50
+ runs-on: ubuntu-latest
51
+ steps:
52
+ - name: checkout
53
+ uses: actions/checkout@v4
54
+ - uses: enarx/spdx@master
55
+ with:
56
+ licenses: Apache-2.0
@@ -0,0 +1,54 @@
1
+ on: [push, pull_request]
2
+ name: test
3
+ jobs:
4
+ sw-openssl:
5
+ name: sw openssl ${{ matrix.runner }} ${{ matrix.toolchain }} ${{ matrix.profile.name }} ${{ matrix.features }}
6
+ runs-on: ${{ matrix.runner }}
7
+ steps:
8
+ - uses: actions/checkout@v4
9
+ - uses: dtolnay/rust-toolchain@stable
10
+ with:
11
+ toolchain: ${{ matrix.toolchain }}
12
+ - run: cargo test ${{ matrix.profile.flag }} --features=${{ matrix.features }}
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ runner:
18
+ - ubuntu-latest
19
+ - macos-13
20
+ toolchain:
21
+ - 1.80.0
22
+ - stable
23
+ profile:
24
+ - name: debug
25
+ - name: release
26
+ flag: --release
27
+ features:
28
+ - openssl
29
+
30
+ sw-crypto_nossl:
31
+ name: sw crypto_nossl ${{ matrix.runner }} ${{ matrix.toolchain }} ${{ matrix.profile.name }} ${{ matrix.features }}
32
+ runs-on: ${{ matrix.runner }}
33
+ steps:
34
+ - uses: actions/checkout@v4
35
+ - uses: dtolnay/rust-toolchain@stable
36
+ with:
37
+ toolchain: ${{ matrix.toolchain }}
38
+ - run: cargo test ${{ matrix.profile.flag }} --features=${{ matrix.features }}
39
+ strategy:
40
+ fail-fast: false
41
+ matrix:
42
+ runner:
43
+ - ubuntu-latest
44
+ - macos-13
45
+ - windows-latest
46
+ toolchain:
47
+ - 1.80.0
48
+ - stable
49
+ profile:
50
+ - name: debug
51
+ - name: release
52
+ flag: --release
53
+ features:
54
+ - crypto_nossl
@@ -0,0 +1,2 @@
1
+ edition = "2021"
2
+ newline_style = "Unix"
@@ -0,0 +1 @@
1
+ * @tylerfanelli @larrydewey @DGonzalezVillal