提交 a40f6dce 编写于 作者: B Bodo Möller

correct error signalling for opendir() failure

上级 08dbdb85
...@@ -116,6 +116,7 @@ static ERR_STRING_DATA ERR_str_functs[]= ...@@ -116,6 +116,7 @@ static ERR_STRING_DATA ERR_str_functs[]=
#ifdef WINDOWS #ifdef WINDOWS
{ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"}, {ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"},
#endif #endif
{ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"},
{0,NULL}, {0,NULL},
}; };
......
...@@ -170,6 +170,7 @@ typedef struct err_state_st ...@@ -170,6 +170,7 @@ typedef struct err_state_st
#define SYS_F_LISTEN 7 #define SYS_F_LISTEN 7
#define SYS_F_ACCEPT 8 #define SYS_F_ACCEPT 8
#define SYS_F_WSASTARTUP 9 /* Winsock stuff */ #define SYS_F_WSASTARTUP 9 /* Winsock stuff */
#define SYS_F_OPENDIR 10
#define ERR_R_FATAL 32 #define ERR_R_FATAL 32
/* reasons */ /* reasons */
......
...@@ -685,7 +685,9 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, ...@@ -685,7 +685,9 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
/* Note that a side effect is that the CAs will be sorted by name */ /* Note that a side effect is that the CAs will be sorted by name */
if(!d) if(!d)
{ {
SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK,ERR_R_MALLOC_FAILURE); SYSerr(SYS_F_OPENDIR, get_last_sys_error());
ERR_add_error_data(3, "opendir('", dir, "')");
SSLerr(SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK, ERR_R_SYS_LIB);
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册