To check if the certificate for google.com has been revoked, I tried the following command: curl -cacert GeoTrustGlobalCA.pem -crlfile gtglobal.pem -v, but I got the dreaded 'SSL certificate problem' error:. About to connect to www.google.com port 443 (#0). Trying 81.24.29.91. Connected. successfully set certificate verify locations:. CAfile: GeoTrustGlobalCA.pemCApath: /etc/ssl/certs. successfully load CRL file:.
CRLfile: gtglobal.pem. SSLv3, TLS handshake, Client hello (1):. SSLv3, TLS handshake, Server hello (2):. SSLv3, TLS handshake, CERT (11):. SSLv3, TLS alert, Server hello (2):. SSL certificate problem, verify that the CA cert is OK.
Details:error:14090086:SSL routines:SSL3GETSERVERCERTIFICATE:certificate verify failed. Closing connection #0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3GETSERVERCERTIFICATE:certificate verify failedMore details here: guess this error is not correct, since Google should have a valid certificate.Do you know how I could issue a curl command that does this correctly?More detailsIf you're wondering why I used those specific files (GeoTrustGlobalCA.pem and gtglobal.pem) in the curl command, this is how I proceeded:. I first looked at what CA issued the certificate for.
The certificate is not issued by a recognized third party – The browsers only trust a handful of certificate authorities to issue SSL certificates and validate their recipients. While anyone can issue an SSL certificate, the browsers will only recognize one from a trusted CA. 'svn: E230001: Server SSL certificate verification failed: issuer is not trusted' I'm not really sure what is the issue, I already reviewed my certificate and is fine. NOTE: as this is for internal purposes, I created my own certificate using OPENSSL. I really appreciate your help and time.
Turns out it is GeoTrust Global CA;. I downloaded the GeoTrust Global CA root certificate from (this is the GeoTrustGlobalCA.pem file);. I downloaded the corresponding CRL (certificate revocation list) from (this is the gtglobal.pem file). Apparently, you cannot just verify a site with a single simple request. See and older related questions on stackoverflow.curl did not work with Certificate Revocation Lists for me either, neither on Windows, nor on Linux.
Why should you use curl? Openssl seems more appropriate: openssl sclient -connect www.google.com:443We get -Certificate chain0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=www.google.comi:/C=US/O=Google Inc/CN=Google Internet Authority G21 s:/C=US/O=Google Inc/CN=Google Internet Authority G2i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CAi:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority-Then we can inspect some certificate: curl openssl x509 -inform der -textgrep crl in the output of the above command.
The interesting parts are: X509v3 CRL Distribution Points:URI:Information Access:OCSP - URI:we can manually inspect crl: curl openssl crl -inform der -textcurl openssl crl -inform der -textNow we see a list of revoked certificates. IMHO, using curl is not enough, another program is required to check certificates. By doing a simple strace curl -vwe see that curl is not checking revocations (not even connecting to the relevant places). It just says.
Server certificate:. subject: C=US; ST=California; L=Mountain View; O=Google Inc; CN=www.google.com. start date: 2014-04-09 11:40:11 GMT. expire date: 2014-07-08 00:00:00 GMT. subjectAltName: www.google.com matched. issuer: C=US; O=Google Inc; CN=Google Internet Authority G2.
SSL certificate verify ok.
. I have a server running apache with a self-signed certificate (the server) with subversion hooked in. It requires a username to checkout or update from the repo.
I have a checkout from the repo that I am trying to update on a cron job on two servers: server and client. Neither cron job will work for the same reason (I have almost the same setup on both, but the client is simpler). The following are on client, where there is only one login: root (I know, please spare me the ridicule). they are both gentoo if you think that matterserror Error validating server certificate for 'The certificate is not issued by a trusted authority.
Use thefingerprint to validate the certificate manually!- The certificate hostname does not match.Certificate information:- Hostname: Tom- Valid: from Sun, 01 Feb 2009 03:51:25 GMT until Tue, 01 Feb 2011 03:51:25 GMT- Issuer: Fake Company, NYC, New York, US- Fingerprint: fingerprint here(R)eject, accept (t)emporarily or accept (p)ermanently?svn: OPTIONS of 'Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted (know all this. Error validating server certificate for 'server:443':- The certificate is not issued by a trusted authority. Use thefingerprint to validate the certificate manually!- The certificate hostname does not match.Certificate information:- Hostname: Tom- Valid: from Sun, 01 Feb 2009 03:51:25 GMT until Tue, 01 Feb 2011 03:51:25 GMT- Issuer: Fake Company, NYC, New York, US- Fingerprint: fingerprint hereThe problem is that your certificate does not match your server's hostname. You need the CN field in the certificate to match your hostname. In yuor case, your hostname is 'server' and your certificate's CN is 'Tom'. You need to regenerate your certificate with the correct CN value. The answers to this question helped me assemble the pieces needed to solve a similar problem i was having.
This is just to pre-assemble the pieces for other linux noobs like me.to test the script you run via cron usesudo suinstead of what I was usingsudo -sotherwise the home directory and other variables won't be as when it is run by cron(root)secondly don't use '-no-auth-cache'. If you add that switch you can never permanently accept the certificate.using the above, I was able to run the script once via sudo su, accept the certificate permanently and subsequent cron runs worked.
Put this in your script: # svn up /BACKUP/checkouts/server/ -username tom –config-dir /xyz/zyxconfig-dir could be anything where you want to store the certificate information. Before running it from the cron, run it manually and accept the certificate permanently, using 'p'.Once accepted, run it through cron and I believe it will work like a charm.There is one more option (if previous option doesn't work by any chance), which is kind of risky in other environments, but in your environment, it should be fine. Use the script something like this: # svn up /BACKUP/checkouts/server/ -username tom -non-interactive –-trust-server-certThis will simply accept the certificate without bothering. This is not advised in the production environment because this is kind of a security risk, but in your case, where you are using self made certificate, you can use it.Source.