SSL: fix misuse of ERR_LIB_SYS
authorRichard Levitte <levitte@openssl.org>
Wed, 1 Jul 2020 20:17:01 +0000 (22:17 +0200)
committerRichard Levitte <levitte@openssl.org>
Sun, 5 Jul 2020 19:13:42 +0000 (21:13 +0200)
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/12343)

ssl/ssl_lib.c

index dd83f373b2053cf433dc1248332a95282b542766..a252761ca49975f937c3fa79fc4dbd53556d5efb 100644 (file)
@@ -2072,7 +2072,8 @@ ossl_ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
     }
 
 #ifdef OPENSSL_NO_KTLS
-    ERR_raise_data(ERR_LIB_SYS, ERR_R_INTERNAL_ERROR, "calling sendfile()");
+    ERR_raise_data(ERR_LIB_SSL, ERR_R_INTERNAL_ERROR,
+                   "can't call ktls_sendfile(), ktls disabled");
     return -1;
 #else
     ret = ktls_sendfile(SSL_get_wfd(s), fd, offset, size, flags);