Closed lsh123 closed 7 months ago
external/olivetti/xmlsec/src/openssl/x509vfy.c:1955:34: error: incompatible function pointer types passing 'int (const X509_NAME_ENTRY *const *, const X509_NAME_ENTRY *const *)' (aka
'int (const struct X509_name_entry_st *const *, const struct X509_name_entry_st *const *)') to parameter of type 'stack_X509_NAME_ENTRY_cmp_func' (aka 'int (*)(const struct X509_name_
entry_st **, const struct X509_name_entry_st **)') [-Werror,-Wincompatible-function-pointer-types]
res = sk_X509_NAME_ENTRY_new(xmlSecOpenSSLX509_NAME_ENTRY_cmp);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/boringssl/src/include/openssl/x509.h:124:1: note: passing argument to parameter 'comp' here
DEFINE_STACK_OF(X509_NAME_ENTRY)
^
external/boringssl/src/include/openssl/stack.h:409:31: note: expanded from macro 'DEFINE_STACK_OF'
#define DEFINE_STACK_OF(type) DEFINE_NAMED_STACK_OF(type, type)
^
external/boringssl/src/include/openssl/stack.h:404:3: note: expanded from macro 'DEFINE_NAMED_STACK_OF'
BORINGSSL_DEFINE_STACK_OF_IMPL(name, type *, const type *) \
^
external/boringssl/src/include/openssl/stack.h:304:47: note: expanded from macro 'BORINGSSL_DEFINE_STACK_OF_IMPL'
sk_##name##_new(stack_##name##_cmp_func comp) { \
^
OK, I changed ./src/openssl/x509vfy.c as follow:
at line 113
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp (const X509_NAME_ENTRY **a, const 509_NAME_ENTRY **b);
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp (const X509_NAME_ENTRY * const *a, const X509_NAME_ENTRY * const *b);
and at line 2050:
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY a, const X509_NAME_ENTRY b) {
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY consta, const X509_NAME_ENTRY constb) {
at least on my android AOSP version 13 now it's ok (with the attached Android.bp)
thanks a lot
copy &paste did a bad output
changes at line 2050 are:
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY a, const X509_NAME_ENTRY b) {
static int xmlSecOpenSSLX509_NAME_ENTRY_cmp(const X509_NAME_ENTRY consta, const X509_NAME_ENTRY constb) {
ok the output is changed by the commit of the message. above consta is ( const a) - constb is ( const b)
no way then take a look on the file at relative line (sorry)
Thanks! Yes I was planning to do something similar :) I will still fix it in the code soon so it works for others as well.
Thanks to you, another important changes was the disable of RIPEMD160 functions that are not implemented in boringssl added -DXMLSEC_NO_RIPEMD160 in my Android.bp
Interestingly, the latest master for boring ssl on github compiles w/o any problems and the cmp function definition aligns with the one in xmlsec:
https://github.com/google/boringssl/blame/master/include/openssl/stack.h#L407
Looks like it was fixed about 8 months ago.
BTW, you can easily disable RipeMD160 using "--without-ripemd160" in the xmlsec ./configure script
ok perfect, I saw that boring ssl on my Android 13 BSP is older then the changes done to the cmp function definition thank you very much!
I will close this issue, please re-open if you have any further problems.
Discussed in https://github.com/lsh123/xmlsec/discussions/763