OCSP responder not present?
Solution 1:
Regarding 1)
OCSP has a "Response signing key/certificate pair" used to authenticate the response. This certificate is given in the response to:
$ openssl ocsp -issuer chain.pem -cert wikipedia.pem -url http://ocsp2.globalsign.com/gsorganizationvalsha2g2 -header "HOST" "ocsp2.globalsign.com" -resp_text
-----BEGIN CERTIFICATE-----
[...]
UMiqxBNugzQ=
-----END CERTIFICATE-----
So let's save that to signcert.pem and see what's up:
$ openssl ocsp -issuer chain_wikipedia.pem -cert wikipedia.pem -url http://ocsp2.globalsign.com/gsorganizationvalsha2g2 -header "HOST" "ocsp2.globalsign.com" -resp_text | sed -n '/-----BEGIN/,/-----END/p' > signcert.pem
$ openssl verify signcert.pem
signcert.pem: C = BE, O = GlobalSign nv-sa, CN = GlobalSign OV CA - SHA256 - G2 OCSP responder - 2, serialNumber = 20150914163800
error 20 at 0 depth lookup:unable to get local issuer certificate
Okay... Guess we're missing the intermediate?
$ openssl x509 -noout -text -in signcert.pem | grep -e 'Issuer:' -e '.crt'
Issuer: C=BE, O=GlobalSign nv-sa, CN=GlobalSign Organization Validation CA - SHA256 - G2
OK, no issuer URI field... That's just dirty. Let's fetch it from the CA and form a chain:
$ curl https://secure.globalsign.com/cacert/gsorganizationvalsha2g2r1.crt | openssl x509 -inform der -outform pem >> signcert.pem
Ok, this should w...:
$ openssl ocsp -VAfile signcert.pem -issuer chain_wikipedia.pem -cert wikipedia.pem -url http://ocsp2.globalsign.com/gsorganizationvalsha2g2 -header "HOST" "ocsp2.globalsign.com" -resp_text
[...]
-----BEGIN CERTIFICATE-----
[...]
/TiSgNCpgNg=
-----END CERTIFICATE-----
Response Verify Failure
... WTF ?! Oh, different signing cert?!
$ cat >> signcert.pem
-----BEGIN CERTIFICATE-----
MIID9DCCAtygAwIBAgISESEjxqkycL2lZt0CfS9OgUN2MA0GCSqGSIb3DQEBCwUA
MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD
VQQDEzNHbG9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BDlpi5WWROM1O5UECquLU3/P1prxF78EkTdv
OSGtP1VLMS47hk5v+sUC3hnfwUyKnr2oiVV6CvxxLOipdeDGl68dVisauNf7Dp9H
YvO8OLkN9es+R2AV5iFIzLWHjsQxLOrY18bi6N0zMP7tuZIRSVpil+b49KJ8T/e1
/TiSgNCpgNg=
-----END CERTIFICATE-----
^D
Fingers crossed...
$ openssl ocsp -VAfile signcert.pem -issuer chain_wikipedia.pem -cert wikipedia.pem -url http://ocsp2.globalsign.com/gsorganizationvalsha2g2 -header "HOST" "ocsp2.globalsign.com"
Response verify OK
wikipedia.pem: good
This Update: Sep 15 17:01:20 2015 GMT
Next Update: Sep 16 05:01:20 2015 GMT
Hell yeah!