Ho distribuito il server ocsp di base da OpenSSl Cookbook
da Ivan Ristic pagina 44 con il seguente comando
$ openssl ocsp -port 9080 -index db/index -rsigner root-ocsp.crt -rkey private/root-ocsp.key -CA root-ca.crt -text
I certificati hanno la seguente catena root-ca -> root-ocsp
e root-ca -> sub-ca -> server
e voglio richiedere lo stato di server.crt
.
$ openssl ocsp -issuer root-ca.crt -issuer sub-ca.crt -CAfile root-ocsp.crt -cert server.crt -url http://127.0.0.1:9080
Response Verify Failure
139779327862424:error:27069065:OCSP routines:OCSP_basic_verify:certificate verify error:ocsp_vfy.c:138:Verify error:unable to get localissuer certificate
server.crt: unknown
This Update: Mar 24 19:44:15 2017 GMT
$ openssl ocsp -issuer root-ca.crt -issuer sub-ca.crt -CAfile root-ca.crt -cert server.crt -url http://127.0.0.1:9080
Response Verify Failure
140137564870296:error:27069070:OCSP routines:OCSP_basic_verify:root ca not trusted:ocsp_vfy.c:166:
server.crt: unknown
This Update: Mar 24 19:51:42 2017 GMT
$ openssl ocsp -issuer sub-ca.crt -issuer root-ca.crt -CAfile root-ocsp.crt -verify_other root-ca.crt -cert server.crt -url http://127.0.0.1:9080
Response Verify Failure
140252372211352:error:27069065:OCSP routines:OCSP_basic_verify:certificate verify error:ocsp_vfy.c:138:Verify error:self signed certificate in certificate chain
server.crt: unknown
This Update: Mar 24 19:53:15 2017 GMT
$ openssl ocsp -issuer sub-ca.crt -issuer root-ca.crt -CAfile root-ca.crt -verify_other root-ocsp.crt -cert server.crt -url http://127.0.0.1:9080
Response Verify Failure
140563322316440:error:27069070:OCSP routines:OCSP_basic_verify:root ca not trusted:ocsp_vfy.c:166:
server.crt: unknown
This Update: Mar 24 19:54:16 2017 GMT
Cosa sto facendo male?
$ ll
total 96
drwxr-xr-x 2 bjorn users 4096 Mar 24 11:19 certs
drwxr-xr-x 2 bjorn users 4096 Mar 24 11:19 db
-rw-r--r-- 1 bjorn wireshark 3160 Mar 19 13:08 ocsp_recording.pcapng
drwxr-xr-x 2 bjorn users 4096 Mar 24 10:56 private
-rw-r--r-- 1 bjorn users 2542 Mar 24 11:03 root-ca.conf
-rw-r--r-- 1 bjorn users 934 Mar 17 21:50 root-ca.crl
-rw-r--r-- 1 bjorn users 6876 Mar 17 21:39 root-ca.crt
-rw-r--r-- 1 bjorn users 1732 Mar 16 14:29 root-ca.csr
-rw-r--r-- 1 bjorn users 5747 Mar 19 10:09 root-ocsp.crt
-rw-r--r-- 1 bjorn users 948 Mar 17 22:07 root-ocsp.csr
-rw-r--r-- 1 bjorn users 5103 Mar 24 11:19 server.crt
-rw-r--r-- 1 bjorn users 980 Mar 24 11:03 server.csr
-rw-r--r-- 1 bjorn users 2436 Mar 16 14:11 sub-ca.conf
-rw-r--r-- 1 bjorn users 6682 Mar 17 22:03 sub-ca.crt
-rw-r--r-- 1 bjorn users 928 Mar 17 21:58 sub-ca.csr
Intero progetto zip (ovunque la password sia pass
)