X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fbss_file.c;h=e3af936374020385a2e50d991352feeb33ff1fcb;hp=0dee7fa34874c7decb755b15c66403d4572f5452;hb=0fc5cf0870c0c9e4240e118ee7a86e5d8b4a6891;hpb=f78d4a35f865d7678a8b8e7a496e72a19f3df014 diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c index 0dee7fa348..e3af936374 100644 --- a/crypto/bio/bss_file.c +++ b/crypto/bio/bss_file.c @@ -103,7 +103,10 @@ BIO *BIO_new_file(const char *filename, const char *mode) { SYSerr(SYS_F_FOPEN,get_last_sys_error()); ERR_add_error_data(5,"fopen('",filename,"','",mode,"')"); - BIOerr(BIO_F_BIO_NEW_FILE,ERR_R_SYS_LIB); + if(errno == ENOENT) + BIOerr(BIO_F_BIO_NEW_FILE,BIO_R_NO_SUCH_FILE); + else + BIOerr(BIO_F_BIO_NEW_FILE,ERR_R_SYS_LIB); return(NULL); } if ((ret=BIO_new(BIO_s_file_internal())) == NULL)