Repository navigation
Conversation
vszakats
marked this pull request as draft
June 7, 2026 15:03
```
/home/runner/work/libssh2/libssh2/src/openssl.c:1193:9: error: cast from 'WOLFSSL_RSA *(*)(WOLFSSL_BIO *, WOLFSSL_RSA **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_RSA *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_RSA **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [clang-diagnostic-cast-function-type-strict,-warnings-as-errors]
1193 | (pem_read_bio_func)&PEM_read_bio_RSAPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:1587:9: error: cast from 'WOLFSSL_RSA *(*)(WOLFSSL_BIO *, WOLFSSL_RSA **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_RSA *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_RSA **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [clang-diagnostic-cast-function-type-strict,-warnings-as-errors]
1587 | (pem_read_bio_func)&PEM_read_bio_RSAPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:1959:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [clang-diagnostic-cast-function-type-strict,-warnings-as-errors]
1959 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:3998:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [clang-diagnostic-cast-function-type-strict,-warnings-as-errors]
3998 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:4030:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [clang-diagnostic-cast-function-type-strict,-warnings-as-errors]
4030 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42 warnings generated.
```
https://github.com/libssh2/libssh2/actions/runs/26970353164/job/79583680999?pr=1972
```
/home/runner/work/libssh2/libssh2/src/openssl.c:1193:9: error: cast from 'WOLFSSL_RSA *(*)(WOLFSSL_BIO *, WOLFSSL_RSA **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_RSA *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_RSA **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
1193 | (pem_read_bio_func)&PEM_read_bio_RSAPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:1587:9: error: cast from 'WOLFSSL_RSA *(*)(WOLFSSL_BIO *, WOLFSSL_RSA **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_RSA *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_RSA **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
1587 | (pem_read_bio_func)&PEM_read_bio_RSAPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:1959:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
1959 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:3998:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
3998 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/work/libssh2/libssh2/src/openssl.c:4030:9: error: cast from 'WOLFSSL_EC_KEY *(*)(WOLFSSL_BIO *, WOLFSSL_EC_KEY **, wc_pem_password_cb *, void *)' (aka 'struct WOLFSSL_EC_KEY *(*)(struct WOLFSSL_BIO *, struct WOLFSSL_EC_KEY **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct WOLFSSL_BIO *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
4030 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 errors generated.
```
https://github.com/libssh2/libssh2/actions/runs/26970353164/job/79583680928?pr=1972
```
../../src/openssl.c:1587:9: error: cast from 'RSA *(*)(BIO *, RSA **, pem_password_cb *, void *)' (aka 'struct rsa_st *(*)(struct bio_st *, struct rsa_st **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct bio_st *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
1587 | (pem_read_bio_func)&PEM_read_bio_RSAPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/openssl.c:1959:9: error: cast from 'EC_KEY *(*)(BIO *, EC_KEY **, pem_password_cb *, void *)' (aka 'struct ec_key_st *(*)(struct bio_st *, struct ec_key_st **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct bio_st *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
1959 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/openssl.c:2575:37: error: cast from 'EVP_PKEY *(*)(BIO *, EVP_PKEY **, pem_password_cb *, void *)' (aka 'struct evp_pkey_st *(*)(struct bio_st *, struct evp_pkey_st **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct bio_st *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
2575 | (pem_read_bio_func)
| ^~~~~~~~~~~~~~~~~~~
2576 | &PEM_read_bio_PrivateKey,
| ~~~~~~~~~~~~~~~~~~~~~~~~
../../src/openssl.c:3998:9: error: cast from 'EC_KEY *(*)(BIO *, EC_KEY **, pem_password_cb *, void *)' (aka 'struct ec_key_st *(*)(struct bio_st *, struct ec_key_st **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct bio_st *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
3998 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/openssl.c:4030:9: error: cast from 'EC_KEY *(*)(BIO *, EC_KEY **, pem_password_cb *, void *)' (aka 'struct ec_key_st *(*)(struct bio_st *, struct ec_key_st **, int (*)(char *, int, int, void *), void *)') to 'pem_read_bio_func' (aka 'void *(*)(struct bio_st *, void **, int (*)(char *, int, int, void *), void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]
4030 | (pem_read_bio_func)&PEM_read_bio_ECPrivateKey;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
```
https://github.com/libssh2/libssh2/actions/runs/26970353164/job/79583680642?pr=1972
``` src/openssl.c(2506): error C2220: warning treated as error - no 'object' file generated [C:\projects\libssh2\_bld\src\libssh2_shared.vcxproj] src/openssl.c(2506): warning C4133: '=': incompatible types - from 'EC_KEY *' to 'EVP_PKEY *' [C:\projects\libssh2\_bld\src\libssh2_shared.vcxproj] src/openssl.c(2506): error C2220: warning treated as error - no 'object' file generated [C:\projects\libssh2\_bld\src\libssh2_static.vcxproj] src/openssl.c(2506): warning C4133: '=': incompatible types - from 'EC_KEY *' to 'EVP_PKEY *' [C:\projects\libssh2\_bld\src\libssh2_static.vcxproj] ``` https://ci.appveyor.com/project/libssh2org/libssh2/builds/54174319/job/rlvjmtxsvkkxo7r9
vszakats
marked this pull request as ready for review
June 7, 2026 20:35
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drop local worker functions, to avoid passing around function pointers,
with a local typedef that needs to be different (and matching upstream
exactly) dependening on crypto backend/version and key type.
Also:
(detected by MSVC after dropping casts.)
the simplicity/clarity of duplicating the BIO calls around each call.
Follow-up to 04ecdb2 #1972
Follow-up to 784446b #1484
Follow-up to b0ab005 #1207
Follow-up to 231a97a
https://github.com/libssh2/libssh2/pull/1991/files?w=1