smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

curl 7.66.0 errors on Windows #261

Closed smanders closed 4 years ago

smanders commented 5 years ago

on Windows, curl fails

smanders@vip-winbld4 MINGW64 /c/Program Files/externpro 19.11.1-vc141-64/bin
$ ./curl_7.66.0.exe -k -v https://postman-echo.com/get
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 3.234.196.85:443...
* TCP_NODELAY set
* Connected to postman-echo.com (3.234.196.85) port 443 (#0)
* ALPN, offering http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [89 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4846 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (OUT), TLS alert, internal error (592):
} [2 bytes data]
* error:1012606B:elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on curve
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Closing connection 0
curl: (35) error:1012606B:elliptic curve routines:EC_POINT_set_affine_coordinates:point is not on curve

using the old version of curl works as expected

smanders@vip-winbld4 MINGW64 /c/Program Files/externpro 19.11.1-vc141-64/bin
$ ./curl_7.42.1.exe -k -v https://postman-echo.com/get
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 52.7.134.158...
* Connected to postman-echo.com (52.7.134.158) port 443 (#0)
* libcurl is now using a weak random seed!
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* TLSv1.2, TLS Unknown, Unknown (22):
} [5 bytes data]
* TLSv1.2, TLS handshake, Client hello (1):
} [512 bytes data]
* SSLv2, Unknown (22):
{ [5 bytes data]
* TLSv1.2, TLS handshake, Server hello (2):
{ [89 bytes data]
* SSLv2, Unknown (22):
{ [5 bytes data]
* TLSv1.2, TLS handshake, CERT (11):
{ [4846 bytes data]
* SSLv2, Unknown (22):
{ [5 bytes data]
* TLSv1.2, TLS handshake, Server key exchange (12):
{ [333 bytes data]
* SSLv2, Unknown (22):
{ [5 bytes data]
* TLSv1.2, TLS handshake, Server finished (14):
{ [4 bytes data]
* SSLv2, Unknown (22):
} [5 bytes data]
* TLSv1.2, TLS handshake, Client key exchange (16):
} [70 bytes data]
* SSLv2, Unknown (20):
} [5 bytes data]
* TLSv1.2, TLS change cipher, Client hello (1):
} [1 bytes data]
* SSLv2, Unknown (22):
} [5 bytes data]
* TLSv1.2, TLS handshake, Finished (20):
} [16 bytes data]
* SSLv2, Unknown (20):
{ [5 bytes data]
* TLSv1.2, TLS change cipher, Client hello (1):
{ [1 bytes data]
* SSLv2, Unknown (22):
{ [5 bytes data]
* TLSv1.2, TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*        subject: CN=postman-echo.com
*        start date: 2019-10-07 00:00:00 GMT
*        expire date: 2020-11-07 12:00:00 GMT
*        issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*        SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* SSLv2, Unknown (23):
} [5 bytes data]
> GET /get HTTP/1.1
> Host: postman-echo.com
> User-Agent: curl/7.42.1
> Accept: */*
>
* SSLv2, Unknown (23):
{ [5 bytes data]
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Wed, 27 Nov 2019 20:47:06 GMT
< ETag: W/"b5-yWSWlAnirVqv6fudn4qdx2Ui514"
< Server: nginx
< set-cookie: sails.sid=s%3Aw48A6vQXHqPQrbe3IcQYe20DVpRDP8VC.2B50Uh8lAd%2FVReC%2Fd69r99jWQEPbyDreiaABo6s1aoo; Path=/; HttpOnly
< Vary: Accept-Encoding
< Content-Length: 181
< Connection: keep-alive
<
{ [181 bytes data]
100   181  100   181    0     0    251      0 --:--:-- --:--:-- --:--:--   263
* Connection #0 to host postman-echo.com left intact
{"args":{},"headers":{"x-forwarded-proto":"https","host":"postman-echo.com","accept":"*/*","user-agent":"curl/7.42.1","x-forwarded-port":"443"},"url":"https://postman-echo.com/get"}

the new version of curl on linux also works as expected

smanders@bluepill:/opt/extern/externpro-19.11.1-gcc740-64-Linux/bin$ ./curl_7.66.0 -k -v https://postman-echo.com
*   Trying 3.234.196.85:443...
* TCP_NODELAY set
* Connected to postman-echo.com (3.234.196.85) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: CN=postman-echo.com
*  start date: Oct  7 00:00:00 2019 GMT
*  expire date: Nov  7 12:00:00 2020 GMT
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
> GET / HTTP/1.1
> Host: postman-echo.com
> User-Agent: curl/7.66.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 302 Found
< Content-Type: text/plain; charset=utf-8
< Date: Wed, 27 Nov 2019 20:52:08 GMT
< Location: https://docs.postman-echo.com
< Server: nginx
* Added cookie sails.sid="s%3AsoYPPVT4TRVseD-E8mZD6iQsK-uxHxkY.0vT1lhKzTloeanwhhqRpBTcE%2FVdNcKUpamfXydaJQV4" for domain postman-echo.com, path /, expire 0
< set-cookie: sails.sid=s%3AsoYPPVT4TRVseD-E8mZD6iQsK-uxHxkY.0vT1lhKzTloeanwhhqRpBTcE%2FVdNcKUpamfXydaJQV4; Path=/; HttpOnly
< Vary: Accept, Accept-Encoding
< Content-Length: 51
< Connection: keep-alive
< 
* Connection #0 to host postman-echo.com left intact
Found. Redirecting to https://docs.postman-echo.com
smanders commented 4 years ago

building openssl (crypto library) with assembly (not using OPENSSL_NO_ASM) fixes the issue!!

smanders@vip-winbld4 MINGW64 /c/src/externpro/_bldc/externpro_19.11.1-23-g21f3b4d-p-vc141-64/bin (dev)
$ ./curl_7.66.0.exe -k -v https://postman-echo.com/get
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 34.202.227.208:443...
* TCP_NODELAY set
* Connected to postman-echo.com (34.202.227.208) port 443 (#0)
* ALPN, offering http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [89 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4846 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: CN=postman-echo.com
*  start date: Oct  7 00:00:00 2019 GMT
*  expire date: Nov  7 12:00:00 2020 GMT
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
} [5 bytes data]
> GET /get HTTP/1.1
> Host: postman-echo.com
> User-Agent: curl/7.66.0
> Accept: */*
>
{ [5 bytes data]
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< Date: Thu, 19 Dec 2019 00:53:14 GMT
< ETag: W/"b5-GER2xodeizD6YhRDvQQ7mlAMuA8"
< Server: nginx
* Added cookie sails.sid="s%3AFiqEFf-D-ig_0v3s9SNBjvpwE_A17Wum.%2FdyBJjW1slFVlZsXQsee43XE%2BtaaIq71CQL4GOrBIqA" for domain postman-echo.com, path /, expire 0
< set-cookie: sails.sid=s%3AFiqEFf-D-ig_0v3s9SNBjvpwE_A17Wum.%2FdyBJjW1slFVlZsXQsee43XE%2BtaaIq71CQL4GOrBIqA; Path=/; HttpOnly
< Vary: Accept-Encoding
< Content-Length: 181
< Connection: keep-alive
<
{ [181 bytes data]
100   181  100   181    0     0    646      0 --:--:-- --:--:-- --:--:--   658
* Connection #0 to host postman-echo.com left intact
{"args":{},"headers":{"x-forwarded-proto":"https","host":"postman-echo.com","accept":"*/*","user-agent":"curl/7.66.0","x-forwarded-port":"443"},"url":"https://postman-echo.com/get"}
smanders commented 4 years ago

openssl linker warnings on windows

wp_block.obj : warning LNK4006: whirlpool_block already defined in wp-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
wp_block.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
keccak1600.obj : warning LNK4006: SHA3_absorb already defined in keccak1600-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
keccak1600.obj : warning LNK4006: SHA3_squeeze already defined in keccak1600-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
keccak1600.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
rc4_skey.obj : warning LNK4006: RC4_options already defined in rc4-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
rc4_skey.obj : warning LNK4006: RC4_set_key already defined in rc4-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
rc4_enc.obj : warning LNK4006: RC4 already defined in rc4-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
rc4_enc.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
rand_egd.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
ecp_nistputil.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
ecp_nistp521.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
ecp_nistp256.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
ecp_nistp224.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
chacha_enc.obj : warning LNK4006: ChaCha20_ctr32 already defined in chacha-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
chacha_enc.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4006: Camellia_Ekeygen already defined in cmll-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4006: Camellia_EncryptBlock_Rounds already defined in cmll-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4006: Camellia_DecryptBlock_Rounds already defined in cmll-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4006: Camellia_EncryptBlock already defined in cmll-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4006: Camellia_DecryptBlock already defined in cmll-x86_64.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
camellia.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_add_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_div_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_mul_add_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_mul_comba4 already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_mul_comba8 already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_mul_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_sqr_comba4 already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_sqr_comba8 already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_sqr_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4006: bn_sub_words already defined in x86_64-gcc.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
bn_asm.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
aes_core.obj : warning LNK4006: AES_set_decrypt_key already defined in aes_x86core.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
aes_core.obj : warning LNK4006: AES_set_encrypt_key already defined in aes_x86core.obj; second definition ignored [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
ebcdic.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library [C:\src\externpro\_bldo\xpbase\Build\openssl_1.1.1d_msvc\crypto\crypto.vcxproj]
smanders commented 4 years ago

completed with commits to dev branch referenced above

added add-remove label since this issue also added the opensslasm project