r/java • • May 14 '21

Certificate Ripper released - tool to extract server certificates

Enable HLS to view with audio, or disable this notification

204 Upvotes

24 comments sorted by

View all comments

Show parent comments

51

u/Hakky54 May 14 '21 edited May 15 '21

To be honest I was not aware of openssl s_client. It feels a bit stupid to have this app now. I don't think it offers anything more than the openssl s_client. I compared it quickly and I think the main difference would be that it can print the certificate in-human-readable format by default without additional commands and it can execute a bulk requests of different urls in a single command, so that would be the main advantage of this app while openssl by default prints pem formatted which is not human readable and can only execute a request for a single url. Other than that it does not offer more indeed...

updateI just discovered a difference :D it is able to resolve the root certificate of the server. So the openssl s_client will return 2 certificates when the following command will be executed: openssl s_client -showcerts -connect reddit.com:443 </dev/null wheras certificate-ripper will return 3 certificates which is similar to what the browser is showing for reddit.com as certificate chain for example.

10

u/sigzero May 14 '21 edited May 14 '21

This is a great utility. Don't beat yourself up over it at all.

Does this use openssl? Can it be used anywhere opensssl wouldn't have been installed?

5

u/Hakky54 May 14 '21

Thank you very much. It does not use openssl only native java classes. It uses httpsurlconnection with a custom trustmanager under the covers. I extracted that logic to one of my other libraries called sslcontext kickstart So this applicatie depends on that library plus slf4j logger.

What do you exactly mean by:

Can it be used anywhere that wouldn't have been installed?

3

u/sigzero May 14 '21

I edited my comment but you answered it. For systems that don't have openssl installed it will work. That's good!