Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test FAILures on macOS High Sierra, version 10.13.6, and Mac OS X 10.4.11, Tiger with Perl 5.34 in t/local/32_x509_get_cert_info.t and t/local/33_x509_create_cert.t #494

Open
ballapete opened this issue Dec 4, 2024 · 4 comments

Comments

@ballapete
Copy link

Hello!

Build, install, test all happen in the MacPorts package manager:

--->  Testing p5.34-net-ssleay
Executing:  cd "/opt/local/var/macports/build/_Users_alpha_ports_perll_p5-net-ssleay/p5.34-net-ssleay/work/Net-SSLeay-1.94" && /usr/bin/make test 
"/opt/local/bin/perl5.34" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Net/SSLeay/SSLeay.bs 644
PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.34" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/local/*.t t/handle/local/*.t
t/handle/local/05_use.t ..................... ok
t/local/01_pod.t ............................ ok
t/local/02_pod_coverage.t ................... skipped: These tests are for only for release candidate testing. Enable with RELEASE_TESTING=1
# 
# Testing Net::SSLeay 1.94
# 
# Perl information:
#   Version:         '5.034003'
#   Executable path: '/opt/local/bin/perl5.34'
# 
# Library version with OpenSSL_version_num():
#   OPENSSL_VERSION_NUMBER: '0x30400000'
# 
# Library information with SSLeay_version() and OpenSSL_version():
#   SSLEAY_VERSION:              'OpenSSL 3.4.0 22 Oct 2024'
#   SSLEAY_CFLAGS:               'compiler: /opt/local/libexec/clang-11-bootstrap/bin/clang -fPIC -arch x86_64 -pipe -Os -arch x86_64 -DL_ENDIAN -DOPENSSL_PIC -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DZLIB -DNDEBUG -I/opt/local/include'
#   SSLEAY_BUILT_ON:             'built on: Tue Oct 29 17:03:06 2024 UTC'
#   SSLEAY_PLATFORM:             'platform: darwin64-x86_64-cc'
#   SSLEAY_DIR:                  'OPENSSLDIR: "/opt/local/libexec/openssl3/etc/openssl"'
#   OPENSSL_ENGINES_DIR:         'ENGINESDIR: "/opt/local/libexec/openssl3/lib/engines-3"'
#   OPENSSL_MODULES_DIR:         'MODULESDIR: "/opt/local/libexec/openssl3/lib/ossl-modules"'
#   OPENSSL_CPU_INFO:            'CPUINFO: OPENSSL_ia32cap=0x1fbae3ffffebffff:0x0'
#   OPENSSL_VERSION_STRING:      '3.4.0'
#   OPENSSL_FULL_VERSION_STRING: '3.4.0'
# 
# Library version information with OPENSSL_version_*():
#   OPENSSL_version_major():          '3'
#   OPENSSL_version_minor():          '4'
#   OPENSSL_version_patch():          '0'
#   OPENSSL_version_pre_release():    ''
#   OPENSSL_version_build_metadata(): ''
# 
# Library information with OPENSSL_info():
#   OPENSSL_INFO_CONFIG_DIR:             '/opt/local/libexec/openssl3/etc/openssl'
#   OPENSSL_INFO_ENGINES_DIR:            '/opt/local/libexec/openssl3/lib/engines-3'
#   OPENSSL_INFO_MODULES_DIR:            '/opt/local/libexec/openssl3/lib/ossl-modules'
#   OPENSSL_INFO_DSO_EXTENSION:          '.dylib'
#   OPENSSL_INFO_DIR_FILENAME_SEPARATOR: '/'
#   OPENSSL_INFO_LIST_SEPARATOR:         ':'
#   OPENSSL_INFO_SEED_SOURCE:            'os-specific'
#   OPENSSL_INFO_CPU_SETTINGS:           'OPENSSL_ia32cap=0x1fbae3ffffebffff:0x0'
t/local/03_use.t ............................ ok
t/local/04_basic.t .......................... ok
t/local/05_passwd_cb.t ...................... ok
t/local/06_tcpecho.t ........................ ok
t/local/07_sslecho.t ........................ ok
t/local/08_pipe.t ........................... ok
t/local/09_ctx_new.t ........................ ok
t/local/10_rand.t ........................... ok
t/local/11_read.t ........................... ok
t/local/15_bio.t ............................ ok
t/local/20_functions.t ...................... ok
t/local/21_constants.t ...................... ok
t/local/22_provider.t ....................... ok
t/local/22_provider_try_load.t .............. ok
t/local/22_provider_try_load_zero_retain.t .. ok
t/local/23_openssl_init.t ................... ok
t/local/30_error.t .......................... ok
t/local/31_rsa_generate_key.t ............... ok

#   Failed test 'X509V3_EXT_print nid=86	extended-cert.cert.pem:6'
#   at t/local/32_x509_get_cert_info.t line 273.
#          got: 'email:[email protected], URI:http://intermediate-ca.net-ssleay.example, DNS:intermediate-ca.net-ssleay.example, Registered ID:1.2.0.0, IP Address:192.168.0.1, IP Address:FD25:F814:AFB5:9873:0:0:0:1, othername: emailAddress:[email protected]'
#     expected: 'email:[email protected], URI:http://intermediate-ca.net-ssleay.example, DNS:intermediate-ca.net-ssleay.example, Registered ID:1.2.0.0, IP Address:192.168.0.1, IP Address:FD25:F814:AFB5:9873:0:0:0:1, othername: emailAddress::[email protected]'

#   Failed test 'X509V3_EXT_print nid=85	extended-cert.cert.pem:8'
#   at t/local/32_x509_get_cert_info.t line 273.
#          got: 'email:[email protected], URI:http://johndoe.net-ssleay.example, DNS:johndoe.net-ssleay.example, Registered ID:1.2.3.4, IP Address:192.168.0.2, IP Address:FD25:F814:AFB5:9873:0:0:0:2, othername: emailAddress:[email protected]'
#     expected: 'email:[email protected], URI:http://johndoe.net-ssleay.example, DNS:johndoe.net-ssleay.example, Registered ID:1.2.3.4, IP Address:192.168.0.2, IP Address:FD25:F814:AFB5:9873:0:0:0:2, othername: emailAddress::[email protected]'
# Looks like you failed 2 tests of 746.
t/local/32_x509_get_cert_info.t ............. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/746 subtests 
t/local/33_x509_create_cert.t ............... ok
t/local/34_x509_crl.t ....................... ok
t/local/35_ephemeral.t ...................... skipped: LibreSSL and OpenSSL 1.1.0 removed support for ephemeral/temporary RSA private keys
t/local/36_verify.t ......................... ok
t/local/37_asn1_time.t ...................... ok
t/local/38_priv-key.t ....................... ok
t/local/39_pkcs12.t ......................... ok
t/local/40_npn_support.t .................... ok
t/local/41_alpn_support.t ................... ok
t/local/42_info_callback.t .................. ok
t/local/43_misc_functions.t ................. ok
t/local/44_sess.t ........................... ok
t/local/45_exporter.t ....................... ok
t/local/46_msg_callback.t ................... ok
t/local/47_keylog.t ......................... ok
t/local/48_client_hello_callback.t .......... ok
t/local/50_digest.t ......................... ok
t/local/61_threads-cb-crash.t ............... ok
t/local/62_threads-ctx_new-deadlock.t ....... ok
t/local/63_ec_key_generate_key.t ............ ok
t/local/64_ticket_sharing.t ................. ok
t/local/65_security_level.t ................. ok
t/local/65_ticket_sharing_2.t ............... ok
t/local/66_curves.t ......................... ok
t/local/kwalitee.t .......................... skipped: These tests are for only for release candidate testing. Enable with RELEASE_TESTING=1

Test Summary Report
-------------------
t/local/32_x509_get_cert_info.t           (Wstat: 512 Tests: 746 Failed: 2)
  Failed tests:  363, 381
  Non-zero exit status: 2
Files=47, Tests=2789, 10 wallclock secs ( 0.34 usr  0.11 sys +  9.37 cusr  1.46 csys = 11.28 CPU)
Result: FAIL
Failed 1/47 test programs. 2/2789 subtests failed.
@Jacob-Mellichamp
Copy link

Jacob-Mellichamp commented Jan 8, 2025

Hey @ballapete . . . Although not an official patch. You'll notice that there is a discrepency at the end of the failed line:
othername: emailAddress::[email protected]' and
othername: emailAddress:[email protected]' (notice the extra :)

For my use case, I just needed all the test to pass... so I added this line in t\local\32_x509_get_cert_info.t

          $ext_data =~ s/::/:/g; # <----- Line 273:
         is( Net::SSLeay::X509V3_EXT_print($ext), $ext_data, "X509V3_EXT_print nid=$nid\t$f:$i" ); #Line 274: 

I imagine there is just a funky way that the emailAddress field is getting parsed here? Someone getting a second : in its string.

Edit: Looks like this is being addressed in this PR: https://github.com/radiator-software/p5-net-ssleay/pull/487/files

@ballapete
Copy link
Author

Thank you, Jacob! I saw the different use of COLONs, but assumed syntax error – not a silly typo (or test for testers?)…

I would have to check the file's context to determine the proper cure with the MacPorts package manager – either sed correcting :: or diff output for a patch. (Preparing work-arounds for other test failures with different modules.)

The comment in the issue states that it depends on the module's version, which makes the cure easier: It will be for all Perl versions the same!

@ballapete
Copy link
Author

ballapete commented Jan 14, 2025 via email

@ballapete
Copy link
Author

ballapete commented Jan 15, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants