scheme mismatch is an error at the server-side, as we only advertise the signature schemes that can be handled
diff --git a/lib/openssl.c b/lib/openssl.c
index 75148ef..01ad2a0 100644
--- a/lib/openssl.c
+++ b/lib/openssl.c
@@ -1047,7 +1047,7 @@
     for (; scheme->scheme_id != UINT16_MAX; ++scheme)
         if (scheme->scheme_id == algo)
             goto SchemeFound;
-    ret = PTLS_ERROR_LIBRARY;
+    ret = PTLS_ALERT_ILLEGAL_PARAMETER;
     goto Exit;
 
 SchemeFound: