aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_file.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-09-08 23:39:26 +0200
committerRichard Levitte <levitte@openssl.org>2016-09-08 23:39:26 +0200
commite82e2186e93e9a678dd8c0c5ba084d21d27d4d62 (patch)
treef38c53ceaa278c989918558fe8afa2883a797477 /crypto/bio/bss_file.c
parent047a5da2494abf565f5fb76f5cd92a05cd7fadd4 (diff)
downloadopenssl-e82e2186e93e9a678dd8c0c5ba084d21d27d4d62.tar.gz
If errno is ENXIO in BSS_new_file(), set BIO_R_NO_SUCH_FILE
VMS sets that errno when the device part of a file spec is malformed or a logical name that doesn't exist. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/bio/bss_file.c')
-rw-r--r--crypto/bio/bss_file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/bio/bss_file.c b/crypto/bio/bss_file.c
index 4f79c32bbb..6af2d9cb87 100644
--- a/crypto/bio/bss_file.c
+++ b/crypto/bio/bss_file.c
@@ -73,7 +73,11 @@ BIO *BIO_new_file(const char *filename, const char *mode)
if (file == NULL) {
SYSerr(SYS_F_FOPEN, get_last_sys_error());
ERR_add_error_data(5, "fopen('", filename, "','", mode, "')");
- if (errno == ENOENT)
+ if (errno == ENOENT
+# ifdef ENXIO
+ || errno == ENXIO
+# endif
+ )
BIOerr(BIO_F_BIO_NEW_FILE, BIO_R_NO_SUCH_FILE);
else
BIOerr(BIO_F_BIO_NEW_FILE, ERR_R_SYS_LIB);