ERR_print_errors.pod 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. =pod
  2. =head1 NAME
  3. ERR_print_errors, ERR_print_errors_fp, ERR_print_errors_cb
  4. - print error messages
  5. =head1 SYNOPSIS
  6. #include <openssl/err.h>
  7. void ERR_print_errors(BIO *bp);
  8. void ERR_print_errors_fp(FILE *fp);
  9. void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
  10. void *u);
  11. =head1 DESCRIPTION
  12. ERR_print_errors() is a convenience function that prints the error
  13. strings for all errors that OpenSSL has recorded to B<bp>, thus
  14. emptying the error queue.
  15. ERR_print_errors_fp() is the same, except that the output goes to a
  16. B<FILE>.
  17. ERR_print_errors_cb() is the same, except that the callback function,
  18. B<cb>, is called for each error line with the string, length, and userdata
  19. B<u> as the callback parameters.
  20. The error strings will have the following format:
  21. [pid]:error:[error code]:[library name]:[function name]:[reason string]:[filename]:[line]:[optional text message]
  22. I<error code> is an 8 digit hexadecimal number. I<library name>,
  23. I<function name> and I<reason string> are ASCII text, as is I<optional
  24. text message> if one was set for the respective error code.
  25. If there is no text string registered for the given error code,
  26. the error string will contain the numeric code.
  27. =head1 RETURN VALUES
  28. ERR_print_errors() and ERR_print_errors_fp() return no values.
  29. =head1 SEE ALSO
  30. L<ERR_error_string(3)>,
  31. L<ERR_get_error(3)>
  32. =head1 COPYRIGHT
  33. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  34. Licensed under the Apache License 2.0 (the "License"). You may not use
  35. this file except in compliance with the License. You can obtain a copy
  36. in the file LICENSE in the source distribution or at
  37. L<https://www.openssl.org/source/license.html>.
  38. =cut