使用openssl配置TSA
我在尝试生成TSA回复时遇到以下错误使用openssl配置TSA,openssl,timestamp,Openssl,Timestamp,我在尝试生成TSA回复时遇到以下错误 $ openssl ts -reply -queryfile test.tsq -out test.tsr -inkey private/tsakey.pem -signer tsa.crt.pem 140234774902432:error:2F083075:time stamp routines:TS_RESP_CTX_set_signer_cert:invalid signer certificate purpose:ts_rsp_sign.c:206
$ openssl ts -reply -queryfile test.tsq -out test.tsr -inkey private/tsakey.pem -signer tsa.crt.pem
140234774902432:error:2F083075:time stamp routines:TS_RESP_CTX_set_signer_cert:invalid signer certificate purpose:ts_rsp_sign.c:206:
在下面找到所遵循的程序
$ openssl req -new -newkey rsa:2048 -keyout private/tsakey.pem -out tsareq.pem -nodes
$ openssl ca -in tsareq.pem -out tsa.crt.pem -extensions mytsa -extfile tsa.x509config
$ openssl ts -query -data test.txt -no_nonce -out test.tsq
$ openssl ts -reply -queryfile test.tsq -out test.tsr -inkey private/tsakey.pem -signer tsa.crt.pem
扩展名文件是:
[mytsa]
basicConstraints=CA:FALSE
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
#keyUsage = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage=timeStamping
在仔细检查和测试之后,我想我找到了答案。对于时间戳,您必须仅包括用于不可否认性和数字签名的密钥用法 所以没有我的文件是像下面所示,它的工作
[mytsa]
basicConstraints=CA:FALSE
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid,issuer
keyUsage = nonRepudiation, digitalSignature
extendedKeyUsage=timeStamping
我把它留在这里,因为其他人可能也有同样的问题。您需要根据将扩展密钥用法标记为关键(extendedKeyUsage=critical,timestamp)。您应该将答案添加到答案块中,并将其作为答案接受;不要将其作为编辑添加到问题中。有了公认的答案,这个问题可以在其他堆栈溢出帖子中引用。@Jilanza:顺便问一下,openTSA是否支持PKCS-11以便与HSMs对话?这个答案为我解决了这个问题。