forked from timchen119/tpm2-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
723 lines (710 loc) · 18.5 KB
/
snapcraft.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
name: tpm2-simulator
version: tpm2.gitmaster+ibmswtpm2.1332
summary: TPM 2.0 utilities
description: |
Set of utilities and a daemon to deal with TPM 2.0 chips built into a wide range of todays devices.
The snap will invoke a TPM 2.0 software simulator daemon from IBM and tpm2-abrmd TPM2 access broker & resource management daemon by default.
confinement: strict
grade: stable
base: core18
slots:
tpm2-abrmd-dbus: # name that is used with 'snap connect' on slots side
interface: dbus
bus: system
name: com.intel.tss2.Tabrmd
apps:
tpm-server:
command: sbin/tpm_server
daemon: simple
plugs: [tpm, network-bind]
tpm2-abrmd:
command: sbin/tpm2-abrmd --allow-root --tcti=mssim
daemon: simple
plugs: [tpm, network-bind]
slots: [tpm2-abrmd-dbus]
swtpm:
command: bin/swtpm
plugs: [tpm, network-bind, home]
activatecredential:
command: bin/tpm2_activatecredential
plugs: [tpm, network, home]
certify:
command: bin/tpm2_certify
plugs: [tpm, network, home]
changeauth:
command: bin/tpm2_changeauth
plugs: [tpm, network, home]
clear:
command: bin/tpm2_clear
plugs: [tpm, network, home]
clearlock:
command: bin/tpm2_clearlock
plugs: [tpm, network, home]
create:
command: bin/tpm2_create
plugs: [tpm, network, home]
createak:
command: bin/tpm2_createak
plugs: [tpm, network, home]
createek:
command: bin/tpm2_createek
plugs: [tpm, network, home]
createpolicy:
command: bin/tpm2_createpolicy
plugs: [tpm, network, home]
createprimary:
command: bin/tpm2_createprimary
plugs: [tpm, network, home]
dictionarylockout:
command: bin/tpm2_dictionarylockout
plugs: [tpm, network, home]
encryptdecrypt:
command: bin/tpm2_encryptdecrypt
plugs: [tpm, network, home]
evictcontrol:
command: bin/tpm2_evictcontrol
plugs: [tpm, network, home]
flushcontext:
command: bin/tpm2_flushcontext
plugs: [tpm, network, home]
getcap:
command: bin/tpm2_getcap
plugs: [tpm, network, home]
getmanufec:
command: bin/tpm2_getmanufec
plugs: [tpm, network, home]
getrandom:
command: bin/tpm2_getrandom
plugs: [tpm, network, home]
hash:
command: bin/tpm2_hash
plugs: [tpm, network, home]
hmac:
command: bin/tpm2_hmac
plugs: [tpm, network, home]
import:
command: bin/tpm2_import
plugs: [tpm, network, home]
listpersistent:
command: bin/tpm2_listpersistent
plugs: [tpm, network, home]
load:
command: bin/tpm2_load
plugs: [tpm, network, home]
loadexternal:
command: bin/tpm2_loadexternal
plugs: [tpm, network, home]
makecredential:
command: bin/tpm2_makecredential
plugs: [tpm, network, home]
nvdefine:
command: bin/tpm2_nvdefine
plugs: [tpm, network, home]
nvlist:
command: bin/tpm2_nvlist
plugs: [tpm, network, home]
nvread:
command: bin/tpm2_nvread
plugs: [tpm, network, home]
nvreadlock:
command: bin/tpm2_nvreadlock
plugs: [tpm, network, home]
nvrelease:
command: bin/tpm2_nvrelease
plugs: [tpm, network, home]
nvwrite:
command: bin/tpm2_nvwrite
plugs: [tpm, network, home]
pcrevent:
command: bin/tpm2_pcrevent
plugs: [tpm, network, home]
pcrextend:
command: bin/tpm2_pcrextend
plugs: [tpm, network, home]
pcrlist:
command: bin/tpm2_pcrlist
plugs: [tpm, network, home]
policyauthorize:
command: bin/tpm2_policyauthorize
plugs: [tpm, network, home]
policycommandcode:
command: bin/tpm2_policycommandcode
plugs: [tpm, network, home]
policyor:
command: bin/tpm2_policyor
plugs: [tpm, network, home]
policypassword:
command: bin/tpm2_policypassword
plugs: [tpm, network, home]
policypcr:
command: bin/tpm2_policypcr
plugs: [tpm, network, home]
policyrestart:
command: bin/tpm2_policyrestart
plugs: [tpm, network, home]
policysecret:
command: bin/tpm2_policysecret
plugs: [tpm, network, home]
print:
command: bin/tpm2_print
plugs: [tpm, network, home]
quote:
command: bin/tpm2_quote
plugs: [tpm, network, home]
rc-decode:
command: bin/tpm2_rc_decode
plugs: [tpm, network, home]
readpublic:
command: bin/tpm2_readpublic
plugs: [tpm, network, home]
rsadecrypt:
command: bin/tpm2_rsadecrypt
plugs: [tpm, network, home]
rsaencrypt:
command: bin/tpm2_rsaencrypt
plugs: [tpm, network, home]
send:
command: bin/tpm2_send
plugs: [tpm, network, home]
sign:
command: bin/tpm2_sign
plugs: [tpm, network, home]
startauthsession:
command: bin/tpm2_startauthsession
plugs: [tpm, network, home]
startup:
command: bin/tpm2_startup
plugs: [tpm, network, home]
unseal:
command: bin/tpm2_unseal
plugs: [tpm, network, home]
verifysignature:
command: bin/tpm2_verifysignature
plugs: [tpm, network, home]
tssactivatecredential:
command: bin/tssactivatecredential
plugs: [tpm, network, home]
tsscertify:
command: bin/tsscertify
plugs: [tpm, network, home]
tsscertifycreation:
command: bin/tsscertifycreation
plugs: [tpm, network, home]
tsschangeeps:
command: bin/tsschangeeps
plugs: [tpm, network, home]
tsschangepps:
command: bin/tsschangepps
plugs: [tpm, network, home]
tssclear:
command: bin/tssclear
plugs: [tpm, network, home]
tssclearcontrol:
command: bin/tssclearcontrol
plugs: [tpm, network, home]
tssclockrateadjust:
command: bin/tssclockrateadjust
plugs: [tpm, network, home]
tssclockset:
command: bin/tssclockset
plugs: [tpm, network, home]
tsscommit:
command: bin/tsscommit
plugs: [tpm, network, home]
tsscontextload:
command: bin/tsscontextload
plugs: [tpm, network, home]
tsscontextsave:
command: bin/tsscontextsave
plugs: [tpm, network, home]
tsscreate:
command: bin/tsscreate
plugs: [tpm, network, home]
tsscreateek:
command: bin/tsscreateek
plugs: [tpm, network, home]
tsscreateekcert:
command: bin/tsscreateekcert
plugs: [tpm, network, home]
tsscreateloaded:
command: bin/tsscreateloaded
plugs: [tpm, network, home]
tsscreateprimary:
command: bin/tsscreateprimary
plugs: [tpm, network, home]
tssdictionaryattacklockreset:
command: bin/tssdictionaryattacklockreset
plugs: [tpm, network, home]
tssdictionaryattackparameters:
command: bin/tssdictionaryattackparameters
plugs: [tpm, network, home]
tssduplicate:
command: bin/tssduplicate
plugs: [tpm, network, home]
tsseccparameters:
command: bin/tsseccparameters
plugs: [tpm, network, home]
tssecephemeral:
command: bin/tssecephemeral
plugs: [tpm, network, home]
tssencryptdecrypt:
command: bin/tssencryptdecrypt
plugs: [tpm, network, home]
tsseventextend:
command: bin/tsseventextend
plugs: [tpm, network, home]
tsseventsequencecomplete:
command: bin/tsseventsequencecomplete
plugs: [tpm, network, home]
tssevictcontrol:
command: bin/tssevictcontrol
plugs: [tpm, network, home]
tssflushcontext:
command: bin/tssflushcontext
plugs: [tpm, network, home]
tssgetcapability:
command: bin/tssgetcapability
plugs: [tpm, network, home]
tssgetcommandauditdigest:
command: bin/tssgetcommandauditdigest
plugs: [tpm, network, home]
tssgetrandom:
command: bin/tssgetrandom
plugs: [tpm, network, home]
tssgetsessionauditdigest:
command: bin/tssgetsessionauditdigest
plugs: [tpm, network, home]
tssgettestresult:
command: bin/tssgettestresult
plugs: [tpm, network, home]
tssgettime:
command: bin/tssgettime
plugs: [tpm, network, home]
tsshash:
command: bin/tsshash
plugs: [tpm, network, home]
tsshashsequencestart:
command: bin/tsshashsequencestart
plugs: [tpm, network, home]
tsshierarchychangeauth:
command: bin/tsshierarchychangeauth
plugs: [tpm, network, home]
tsshierarchycontrol:
command: bin/tsshierarchycontrol
plugs: [tpm, network, home]
tsshmac:
command: bin/tsshmac
plugs: [tpm, network, home]
tsshmacstart:
command: bin/tsshmacstart
plugs: [tpm, network, home]
tssimaextend:
command: bin/tssimaextend
plugs: [tpm, network, home]
tssimport:
command: bin/tssimport
plugs: [tpm, network, home]
tssimportpem:
command: bin/tssimportpem
plugs: [tpm, network, home]
tssload:
command: bin/tssload
plugs: [tpm, network, home]
tssloadexternal:
command: bin/tssloadexternal
plugs: [tpm, network, home]
tssmakecredential:
command: bin/tssmakecredential
plugs: [tpm, network, home]
tssntc2getconfig:
command: bin/tssntc2getconfig
plugs: [tpm, network, home]
tssntc2lockconfig:
command: bin/tssntc2lockconfig
plugs: [tpm, network, home]
tssntc2preconfig:
command: bin/tssntc2preconfig
plugs: [tpm, network, home]
tssnvcertify:
command: bin/tssnvcertify
plugs: [tpm, network, home]
tssnvchangeauth:
command: bin/tssnvchangeauth
plugs: [tpm, network, home]
tssnvdefinespace:
command: bin/tssnvdefinespace
plugs: [tpm, network, home]
tssnvextend:
command: bin/tssnvextend
plugs: [tpm, network, home]
tssnvglobalwritelock:
command: bin/tssnvglobalwritelock
plugs: [tpm, network, home]
tssnvincrement:
command: bin/tssnvincrement
plugs: [tpm, network, home]
tssnvread:
command: bin/tssnvread
plugs: [tpm, network, home]
tssnvreadlock:
command: bin/tssnvreadlock
plugs: [tpm, network, home]
tssnvreadpublic:
command: bin/tssnvreadpublic
plugs: [tpm, network, home]
tssnvsetbits:
command: bin/tssnvsetbits
plugs: [tpm, network, home]
tssnvundefinespace:
command: bin/tssnvundefinespace
plugs: [tpm, network, home]
tssnvundefinespacespecial:
command: bin/tssnvundefinespacespecial
plugs: [tpm, network, home]
tssnvwrite:
command: bin/tssnvwrite
plugs: [tpm, network, home]
tssnvwritelock:
command: bin/tssnvwritelock
plugs: [tpm, network, home]
tssobjectchangeauth:
command: bin/tssobjectchangeauth
plugs: [tpm, network, home]
tsspcrallocate:
command: bin/tsspcrallocate
plugs: [tpm, network, home]
tsspcrevent:
command: bin/tsspcrevent
plugs: [tpm, network, home]
tsspcrextend:
command: bin/tsspcrextend
plugs: [tpm, network, home]
tsspcrread:
command: bin/tsspcrread
plugs: [tpm, network, home]
tsspcrreset:
command: bin/tsspcrreset
plugs: [tpm, network, home]
tsspolicyauthorize:
command: bin/tsspolicyauthorize
plugs: [tpm, network, home]
tsspolicyauthorizenv:
command: bin/tsspolicyauthorizenv
plugs: [tpm, network, home]
tsspolicyauthvalue:
command: bin/tsspolicyauthvalue
plugs: [tpm, network, home]
tsspolicycommandcode:
command: bin/tsspolicycommandcode
plugs: [tpm, network, home]
tsspolicycountertimer:
command: bin/tsspolicycountertimer
plugs: [tpm, network, home]
tsspolicycphash:
command: bin/tsspolicycphash
plugs: [tpm, network, home]
tsspolicyduplicationselect:
command: bin/tsspolicyduplicationselect
plugs: [tpm, network, home]
tsspolicygetdigest:
command: bin/tsspolicygetdigest
plugs: [tpm, network, home]
tsspolicymaker:
command: bin/tsspolicymaker
plugs: [tpm, network, home]
tsspolicymakerpcr:
command: bin/tsspolicymakerpcr
plugs: [tpm, network, home]
tsspolicynamehash:
command: bin/tsspolicynamehash
plugs: [tpm, network, home]
tsspolicynv:
command: bin/tsspolicynv
plugs: [tpm, network, home]
tsspolicynvwritten:
command: bin/tsspolicynvwritten
plugs: [tpm, network, home]
tsspolicyor:
command: bin/tsspolicyor
plugs: [tpm, network, home]
tsspolicypassword:
command: bin/tsspolicypassword
plugs: [tpm, network, home]
tsspolicypcr:
command: bin/tsspolicypcr
plugs: [tpm, network, home]
tsspolicyrestart:
command: bin/tsspolicyrestart
plugs: [tpm, network, home]
tsspolicysecret:
command: bin/tsspolicysecret
plugs: [tpm, network, home]
tsspolicysigned:
command: bin/tsspolicysigned
plugs: [tpm, network, home]
tsspolicytemplate:
command: bin/tsspolicytemplate
plugs: [tpm, network, home]
tsspolicyticket:
command: bin/tsspolicyticket
plugs: [tpm, network, home]
tsspowerup:
command: bin/tsspowerup
plugs: [tpm, network, home]
tssquote:
command: bin/tssquote
plugs: [tpm, network, home]
tssreadclock:
command: bin/tssreadclock
plugs: [tpm, network, home]
tssreadpublic:
command: bin/tssreadpublic
plugs: [tpm, network, home]
tssreturncode:
command: bin/tssreturncode
plugs: [tpm, network, home]
tssrewrap:
command: bin/tssrewrap
plugs: [tpm, network, home]
tssrsadecrypt:
command: bin/tssrsadecrypt
plugs: [tpm, network, home]
tssrsaencrypt:
command: bin/tssrsaencrypt
plugs: [tpm, network, home]
tsssequencecomplete:
command: bin/tsssequencecomplete
plugs: [tpm, network, home]
tsssequenceupdate:
command: bin/tsssequenceupdate
plugs: [tpm, network, home]
tsssetprimarypolicy:
command: bin/tsssetprimarypolicy
plugs: [tpm, network, home]
tssshutdown:
command: bin/tssshutdown
plugs: [tpm, network, home]
tsssign:
command: bin/tsssign
plugs: [tpm, network, home]
tsssignapp:
command: bin/tsssignapp
plugs: [tpm, network, home]
tssstartauthsession:
command: bin/tssstartauthsession
plugs: [tpm, network, home]
tssstartup:
command: bin/tssstartup
plugs: [tpm, network, home]
tssstirrandom:
command: bin/tssstirrandom
plugs: [tpm, network, home]
tsstimepacket:
command: bin/tsstimepacket
plugs: [tpm, network, home]
tsstpm2pem:
command: bin/tsstpm2pem
plugs: [tpm, network, home]
tsstpmpublic2eccpoint:
command: bin/tsstpmpublic2eccpoint
plugs: [tpm, network, home]
tssunseal:
command: bin/tssunseal
plugs: [tpm, network, home]
tssverifysignature:
command: bin/tssverifysignature
plugs: [tpm, network, home]
tsswriteapp:
command: bin/tsswriteapp
plugs: [tpm, network, home]
tsszgen2phase:
command: bin/tsszgen2phase
plugs: [tpm, network, home]
parts:
common:
plugin: dump
source: .
prime:
- copyright.tpm2-tss
- copyright.tpm2-tools
tpm2-tss:
plugin: make
source: https://github.com/tpm2-software/tpm2-tss.git
source-type: git
#source-tag: 2.0.1
build-packages:
- autoconf
- autoconf-archive
- libtool
- gcc-7
- g++-7
- gnulib
#- gcc #16.04
#- g++ #16.04
- libc6-dev
- liburiparser-dev
- libssl-dev
- libgcrypt20-dev
- doxygen
stage-packages:
- libgcrypt20
- libssl1.1
#- libssl1.0.0 #16.04
- libgpg-error0
override-build: |
ACLOCAL_PATH="/usr/share/gnulib/m4" ./bootstrap #https://github.com/tpm2-software/tpm2-tss/commit/d1106347ef2f8e7296f1bd6af7aa6e046f6a5a38
./configure --enable-unit --prefix=$SNAPCRAFT_PART_INSTALL/usr/
make check -j8
make install
tpm2-abrmd:
plugin: autotools
source: https://github.com/tpm2-software/tpm2-abrmd.git
source-type: git
#source-tag: 2.0.3
configflags:
- --enable-unit
- --with-dbuspolicydir=/etc/dbus-1/system.d
stage-packages:
- libblkid1
- libmount1
- libpcre3
- libselinux1
- libuuid1
- libglib2.0-0
build-packages:
- libdbus-1-dev
- libglib2.0-dev
- dbus-x11
- wget #16.04
after:
- tpm2-tss
override-build: |
# workaround 16.04 autoconf-archive https://github.com/tpm2-software/tpm2-abrmd/issues/404
#sed -i '/AX_VALGRIND_DFLT(\[sgcheck.*/d' configure.ac
#sed -i '/AX_VALGRIND_DFLT(\[helgrind.*/d' configure.ac
#sed -i '/AX_VALGRIND_DFLT(\[drd.*/d' configure.ac
snapcraftctl build
dbus-launch make check -j8
tpm2-tools:
plugin: autotools
#
# By default the snapcraft autotools plugin doesn't
# specify the -O2 CFLAG when compiling C/C++. This
# causes an undefined symbol when building tpm2_nvlist.
#configflags:
# - "CFLAGS=-O2"
source: https://github.com/tpm2-software/tpm2-tools.git
source-type: git
#source-tag: 3.1.3
configflags:
- --prefix=$SNAPCRAFT_PART_INSTALL/
- bashcompdir=SNAPCRAFT_PART_INSTALL/usr/share/bash-completion/completions/
# - --enable-unit
build-packages:
- pkg-config
- libcmocka-dev
- libtool
- python-pretty-yaml
#- python-yaml #16.04
- lcov
- pandoc
- libcurl4-openssl-dev
stage-packages:
- libgnutls-openssl27
- openssl
- libcom-err2
#- libcomerr2 #16.04
- libkeyutils1
- zlib1g
- libasn1-8-heimdal
- libcurl4
#- libcurl3 #16.04
- libgssapi-krb5-2
- libhcrypto4-heimdal
- libheimbase1-heimdal
- libheimntlm0-heimdal
- libhx509-5-heimdal
- libk5crypto3
- libkrb5-26-heimdal
- libkrb5-3
- libkrb5support0
- libldap-2.4-2
- libnghttp2-14
- libpsl5
#- libpsl0 #16.04
- libroken18-heimdal
- librtmp1
- libsasl2-2
- libsqlite3-0
- libwind0-heimdal
- libdb5.3
after:
- tpm2-tss
- tpm2-abrmd
override-build: |
snapcraftctl build
# Run all tests shipped by default
make check -j8
make install
ibmtpm20tss:
plugin: autotools
source: https://git.code.sf.net/p/ibmtpm20tss/tss
source-type: git
source-tag: autotoolsv2
configflags:
- --disable-tpm-1.2
after:
- tpm2-tools
ibmswtpm2:
plugin: make
source: https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1332.tar.gz
source-type: tar
after:
- ibmtpm20tss
override-build: |
cd src
make -j8
mkdir -p $SNAPCRAFT_PART_INSTALL/sbin/
mv tpm_server $SNAPCRAFT_PART_INSTALL/sbin/
libtpms:
plugin: autotools
source: https://github.com/stefanberger/libtpms.git
source-type: git
configflags:
- --with-openssl
- --with-tpm2
build-packages:
- libtool
- automake
- autoconf
- gcc
- build-essential
- libssl-dev
- dh-exec
- pkg-config
- net-tools
after:
- ibmswtpm2
swtpm:
plugin: autotools
source: https://github.com/stefanberger/swtpm.git
source-type: git
configflags:
- --with-openssl
stage-packages:
- libfuse2
build-packages:
- libfuse-dev
- libglib2.0-dev
- libgmp-dev
- expect
- libtasn1-6-dev
- socat
- python3-twisted
- gnutls-dev
- gnutls-bin
- gawk
after:
- libtpms
organize:
lib/swtpm/*: lib/