fermitools / cigetcert

Get an X.509 certificate with SAML ECP and store proxies.
Other
2 stars 6 forks source link

check for clean shutdown #22

Closed ghost closed 8 years ago

DrDaveD commented 8 years ago

This code doesn't do anything because the check just above it always returns.

If I remove the check above it ends up not reading any data from cigetcertopts.txt. If I only call close, it works. According to the m2crypto source code the close function is already calling ssl_shutdown, so maybe we don't need to do anything but call close.

ghost commented 8 years ago

Since the m2crypto close function is calling ssl_shutdown (but not close), would we need to also call del to actually close the socket? Because most people seem to recommend both shutting down and closing a socket..

DrDaveD commented 8 years ago

I assume that m2crypto is closing the socket when it receives a shutdown reply. In any case, I don't think it matters because the cigetcert application stops using it and soon exits, which will close all file descriptors.

DrDaveD commented 8 years ago

Replaced by #28