File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7979if component_path ['SOFTHSM' ].endswith ('softhsm2-util' ):
8080 softhsm_version = 2
8181
82+ openssl_version = subprocess .check_output ([component_path ['OPENSSL' ],
83+ 'version' ]
84+ )[8 :11 ]
85+
8286p11_test_files = []
8387softhsm_conf = None
8488server_cert_pem = None
@@ -162,18 +166,20 @@ def setup():
162166[engine_section]
163167pkcs11 = pkcs11_section
164168
169+ [req]
170+ distinguished_name = req_distinguished_name
171+
172+ [req_distinguished_name]
173+
165174[pkcs11_section]
166175engine_id = pkcs11
167- dynamic_path = %s
168- #MODULE_PATH = %s
176+ MODULE_PATH = %s
169177PIN = secret1
170178init = 0
179+ """ % (component_path ['P11_MODULE' ]))
171180
172- [req]
173- distinguished_name = req_distinguished_name
174-
175- [req_distinguished_name]
176- """ % (component_path ['P11_ENGINE' ], component_path ['P11_MODULE' ]))
181+ if openssl_version == "1.0" :
182+ f .write ("dynamic_path = %s" % component_path ['P11_ENGINE' ])
177183
178184 signer_cert_der = _tf ()
179185
@@ -185,7 +191,7 @@ def setup():
185191 '-engine' , 'pkcs11' ,
186192 '-config' , openssl_conf ,
187193 '-keyform' , 'engine' ,
188- '-key' , 'pkcs11:token=test ' ,
194+ '-key' , 'label_test ' ,
189195 '-passin' , 'pass:secret1' ,
190196 '-out' , signer_cert_pem ], softhsm_conf = softhsm_conf )
191197
You can’t perform that action at this time.
0 commit comments