Skip to content

Commit 5260a22

Browse files
committed
Updates, mostly to testdata, to tool modernisations
- label= become object= in certtool, breaking change? - libsofthsm2 is readily available in distributions - certtool now produces multiple hashes, and references with SHA1
1 parent b445963 commit 5260a22

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

etc/tlspool.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ db_trust ../trust.db
195195
# the TLS Pool.
196196
#
197197

198-
pkcs11_path /usr/local/lib/softhsm/libsofthsm2.so
198+
pkcs11_path /usr/lib/softhsm/libsofthsm2.so
199199
pkcs11_pin 1234
200200
pkcs11_token pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;token=TLS_Pool_dev_data
201201

testdata/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,43 +73,43 @@ endif
7373
PRIVKEY1=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj1label/!d' -e 's/^[ \t]*URL: //')
7474
ifeq ($(PRIVKEY1),)
7575
PRIVKEYGEN += privkey1
76-
PRIVKEY1=$(P11URI);id=%30%31;label=obj1label;type=private
76+
PRIVKEY1=$(P11URI);id=%30%31;object=obj1label;type=private
7777
endif
7878

7979
PRIVKEY2=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj2label/!d' -e 's/^[ \t]*URL: //')
8080
ifeq ($(PRIVKEY2),)
8181
PRIVKEYGEN += privkey2
82-
PRIVKEY2=$(P11URI);id=%30%32;label=obj2label;type=private
82+
PRIVKEY2=$(P11URI);id=%30%32;object=obj2label;type=private
8383
endif
8484

8585
PRIVKEY3=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj3label/!d' -e 's/^[ \t]*URL: //')
8686
ifeq ($(PRIVKEY3),)
8787
PRIVKEYGEN += privkey3
88-
PRIVKEY3=$(P11URI);id=%30%33;label=obj3label;type=private
88+
PRIVKEY3=$(P11URI);id=%30%33;object=obj3label;type=private
8989
endif
9090

9191
PRIVKEY4=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj4label/!d' -e 's/^[ \t]*URL: //')
9292
ifeq ($(PRIVKEY4),)
9393
PRIVKEYGEN += privkey4
94-
PRIVKEY4=$(P11URI);id=%30%34;label=obj4label;type=private
94+
PRIVKEY4=$(P11URI);id=%30%34;object=obj4label;type=private
9595
endif
9696

9797
PRIVKEY5=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj5label/!d' -e 's/^[ \t]*URL: //')
9898
ifeq ($(PRIVKEY5),)
9999
PRIVKEYGEN += privkey5
100-
PRIVKEY5=$(P11URI);id=%30%35;label=obj5label;type=private
100+
PRIVKEY5=$(P11URI);id=%30%35;object=obj5label;type=private
101101
endif
102102

103103
PRIVKEY6=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj6label/!d' -e 's/^[ \t]*URL: //')
104104
ifeq ($(PRIVKEY6),)
105105
PRIVKEYGEN += privkey6
106-
PRIVKEY6=$(P11URI);id=%30%36;label=obj6label;type=private
106+
PRIVKEY6=$(P11URI);id=%30%36;object=obj6label;type=private
107107
endif
108108

109109
PRIVKEY7=$(shell $(P11TOOL) --list-privkeys '$(P11URI)' | sed -e '/object=obj7label/!d' -e 's/^[ \t]*URL: //')
110110
ifeq ($(PRIVKEY7),)
111111
PRIVKEYGEN += privkey7
112-
PRIVKEY7=$(P11URI);id=%30%37;label=obj7label;type=private
112+
PRIVKEY7=$(P11URI);id=%30%37;object=obj7label;type=private
113113
endif
114114

115115

@@ -278,7 +278,7 @@ tlspool-test-webhost-cert.der: tlspool-test-webhost-cert.template
278278

279279
# Turn a .der into a .keyid
280280
%.keyid: %.der
281-
$(CERTTOOL) --inraw --infile $< -i | sed -e '1,/Public Key ID:/d' -e '/Public key.s random art:/,$$d' -e 's/[ \t]*//' > $@
281+
$(CERTTOOL) --inraw --infile $< -i | sed -e '1,/Public Key ID:/d' -e '/Public key.s random art:/,$$d' -e 's/[ \t]*//' | sed -n -e 's/^sha1://' -e '/^[^:]*$$/p' > $@
282282

283283
#
284284
# SRP credentials are loaded from fixed paths ../testdata/tlspool-test-srp.* for now

0 commit comments

Comments
 (0)