Hi Oliver,

On 03.06.2015 0:07, Oliver Welter wrote:
>> t/25_crypto/24_xs_ecdh.t ......................... Failed 11/12 subtests
>
> This looks like you can not load the new XS module, did you run a "make
> clean" before your tests and can you see any errors during build.
>
> Can you please try if you can load the module with
> "perl -MOpenXPKI::Crypto::Backend::OpenSSL::ECDH"

I was able to load this module only after "make install" stage for oxi.
Before you said it, I thought that tests should normally be run _before_ 
"make install".
Also, after "make install", ecdh related tests pass ok.

As for build warnings related to ecdh, they are many, see below.

And please add "\n" to messages from lines 114 and 118 of the 
.../core/server/Makefile.PL

Regards, Sergei
====================================================
In file included from OpenXPKI.xs:2:
In file included from /usr/local/lib/perl5/5.20/mach/CORE/perl.h:5199:
/usr/local/lib/perl5/5.20/mach/CORE/inline.h:311:9: warning: nonnull 
parameter 'pv' will evaluate to 'true' on first encounter 
[-Wpointer-bool-conversion]
     if (pv && len > 1) {
         ^~ ~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:33:9: warning: implicit 
declaration of function 'PEM_write_bio_ECPrivateKey' is invalid in C99 
[-Wimplicit-function-declaration]
     r = PEM_write_bio_ECPrivateKey(out, ec_key, NULL, NULL, 0, NULL, NULL);
         ^
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:41:20: warning: passing 
'unsigned char *' to parameter of type 'const char *' converts between 
pointers to integer types with different sign [-Wpointer-sign]
     key = newSVpvn(outkey ,len);
                    ^~~~~~
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:386:44: note: expanded from 
macro 'newSVpvn'
#define newSVpvn(a,b)           Perl_newSVpvn(aTHX_ a,b)
                                                     ^
/usr/local/lib/perl5/5.20/mach/CORE/proto.h:2952:57: note: passing 
argument to parameter 's' here
PERL_CALLCONV SV*       Perl_newSVpvn(pTHX_ const char *const s, const 
STRLEN len)
                                                               ^
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:72:14: warning: implicit 
declaration of function 'PEM_read_bio_ECPrivateKey' is invalid in C99 
[-Wimplicit-function-declaration]
     ec_key = PEM_read_bio_ECPrivateKey(in_eckey, NULL,NULL,NULL);
              ^
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:72:12: warning: 
incompatible integer to pointer conversion assigning to 'EC_KEY *' (aka 
'struct ec_key_st *') from 'int' [-Wint-conversion]
     ec_key = PEM_read_bio_ECPrivateKey(in_eckey, NULL,NULL,NULL);
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:76:9: warning: implicit 
declaration of function 'PEM_write_bio_EC_PUBKEY' is invalid in C99 
[-Wimplicit-function-declaration]
     r = PEM_write_bio_EC_PUBKEY(out_ec_pub_key ,ec_key);
         ^
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:78:12: warning: assigning 
to 'char *' from 'unsigned char *' converts between pointers to integer 
types with different sign [-Wpointer-sign]
     outkey = (unsigned char* ) malloc (len+1);
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:120:17: warning: implicit 
declaration of function 'PEM_read_bio_EC_PUBKEY' is invalid in C99 
[-Wimplicit-function-declaration]
     ec_pubkey = PEM_read_bio_EC_PUBKEY(in_pub, NULL,NULL,NULL);
                 ^
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:120:15: warning: 
incompatible integer to pointer conversion assigning to 'EC_KEY *' (aka 
'struct ec_key_st *') from 'int' [-Wint-conversion]
     ec_pubkey = PEM_read_bio_EC_PUBKEY(in_pub, NULL,NULL,NULL);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:129:11: warning: assigning 
to 'EC_GROUP *' (aka 'struct ec_group_st *') from 'const EC_GROUP *' 
(aka 'const struct ec_group_st *') discards qualifiers 
[-Wincompatible-pointer-types-discards-qualifiers]
     group = EC_KEY_get0_group(ec_pubkey);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:162:8: warning: 
incompatible integer to pointer conversion assigning to 'EC_KEY *' (aka 
'struct ec_key_st *') from 'int' [-Wint-conversion]
         eckey = PEM_read_bio_ECPrivateKey(tmp, NULL,NULL,NULL);
               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./OpenXPKI/Crypto/Backend/OpenSSL/XS/ECDH.xs:198:17: warning: passing 
'unsigned char [keySize]' to parameter of type 'const char *' converts 
between pointers to integer types with different sign [-Wpointer-sign]
         key = newSVpvn(outkey ,n);
                        ^~~~~~
/usr/local/lib/perl5/5.20/mach/CORE/embed.h:386:44: note: expanded from 
macro 'newSVpvn'
#define newSVpvn(a,b)           Perl_newSVpvn(aTHX_ a,b)
                                                     ^
/usr/local/lib/perl5/5.20/mach/CORE/proto.h:2952:57: note: passing 
argument to parameter 's' here
PERL_CALLCONV SV*       Perl_newSVpvn(pTHX_ const char *const s, const 
STRLEN len)
                                                               ^
12 warnings generated.
====================================================

------------------------------------------------------------------------------
_______________________________________________
OpenXPKI-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openxpki-devel

Reply via email to