21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

* All done. Set the return code based on the status from the response. */<br />

if (status = = V_OCSP_CERTSTATUS_REVOKED)<br />

result = SPC_OCSPRESULT_CERTIFICATE_REVOKED;<br />

else<br />

result = SPC_OCSPRESULT_CERTIFICATE_VALID;<br />

end:<br />

if (bio) BIO_free_all(bio);<br />

if (host) OPENSSL_free(host);<br />

if (port) OPENSSL_free(port);<br />

if (path) OPENSSL_free(path);<br />

if (req) OCSP_REQUEST_free(req);<br />

if (resp) OCSP_RESPONSE_free(resp);<br />

if (basic) OCSP_BASICRESP_free(basic);<br />

if (ctx) SSL_CTX_free(ctx);<br />

if (store) X509_STORE_free(store);<br />

return result;<br />

}<br />

See Also<br />

• RFC 2560: Online Certificate Status Protocol<br />

• Recipes 10.1, 10.5, 10.10<br />

Checking Revocation Status via OCSP with OpenSSL | 567<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!