X509_verify_cert.pod 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. =pod
  2. =head1 NAME
  3. X509_verify_cert - discover and verify X509 certificte chain
  4. =head1 SYNOPSIS
  5. #include <openssl/x509.h>
  6. int X509_verify_cert(X509_STORE_CTX *ctx);
  7. =head1 DESCRIPTION
  8. The X509_verify_cert() function attempts to discover and validate a
  9. certificate chain based on parameters in B<ctx>. A complete description of
  10. the process is contained in the L<verify(1)|verify(1)> manual page.
  11. =head1 RETURN VALUES
  12. If a complete chain can be built and validated this function returns 1,
  13. otherwise it return zero, in exceptional circumstances it can also
  14. return a negative code.
  15. If the function fails additional error information can be obtained by
  16. examining B<ctx> using, for example X509_STORE_CTX_get_error().
  17. =head1 NOTES
  18. Applications rarely call this function directly but it is used by
  19. OpenSSL internally for certificate validation, in both the S/MIME and
  20. SSL/TLS code.
  21. The negative return value from X509_verify_cert() can only occur if no
  22. certificate is set in B<ctx> (due to a programming error); if X509_verify_cert()
  23. twice without reinitialising B<ctx> in between; or if a retry
  24. operation is requested during internal lookups (which never happens with
  25. standard lookup methods). It is however recommended that application check
  26. for <= 0 return value on error.
  27. =head1 BUGS
  28. This function uses the header B<x509.h> as opposed to most chain verification
  29. functiosn which use B<x509_vfy.h>.
  30. =head1 SEE ALSO
  31. L<X509_STORE_CTX_get_error(3)|X509_STORE_CTX_get_error(3)>
  32. =head1 HISTORY
  33. X509_verify_cert() is available in all versions of SSLeay and OpenSSL.
  34. =cut