ERR_print_errors, ERR_print_errors_fp的目的都是打印错误字段;
引入文件和格式为
#include <openssl/err.h>;
void ERR_print_errors(BIO *bp);
void ERR_print_errors_fp(FILE *fp);
ERR_print_errors实现了“打印openssl记录到bp的所有错误的错误字符串,从而清空错误队列”的功能,ERR_print_errors_fp也与之类似,不同之处在于它会输出到一个文件中。
这两个函数均没有return value。
错误字符串的格式如下:
[pid]:error:[error code]:[library name]:[function name]:[reason string]:[file name]:[line]:[optional text message]