Fix examples build with Openssl 4.0#1195
Open
LocutusOfBorg wants to merge 1 commit into
Open
Conversation
From: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1138364 | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp: In function ‘bool verify_subject_alternative_name(const char*, X509*)’: | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:67:57: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] | 67 | if (ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name)) { | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp: In function ‘bool verify_common_name(const char*, X509*)’: | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:87:62: error: invalid conversion from ‘const X509_NAME_ENTRY*’ {aka ‘const X509_name_entry_st*’} to ‘X509_NAME_ENTRY*’ {aka ‘X509_name_entry_st*’} [-fpermissive] | 87 | X509_NAME_ENTRY * common_name_entry = X509_NAME_get_entry(X509_get_subject_name(cert), common_name_loc); | | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | const X509_NAME_ENTRY* {aka const X509_name_entry_st*} | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:93:62: error: invalid conversion from ‘const ASN1_STRING*’ {aka ‘const asn1_string_st*’} to ‘ASN1_STRING*’ {aka ‘asn1_string_st*’} [-fpermissive] | 93 | ASN1_STRING * common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry); | | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ | | | | | const ASN1_STRING* {aka const asn1_string_st*} | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:101:46: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] | 101 | if (ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) { | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ | make[3]: *** [examples/print_client_tls/CMakeFiles/print_client_tls.dir/build.make:82: examples/print_client_tls/CMakeFiles/print_client_tls.dir/print_client_tls.cpp.o] Error 1
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.
From:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1138364
| /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp: In function ‘bool verify_subject_alternative_name(const char*, X509*)’: | /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:67:57: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
| 67 | if (ASN1_STRING_length(current_name->d.dNSName) != strlen(dns_name)) {
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp: In function ‘bool verify_common_name(const char*, X509*)’:
| /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:87:62: error: invalid conversion from ‘const X509_NAME_ENTRY’ {aka ‘const X509_name_entry_st’} to ‘X509_NAME_ENTRY’ {aka ‘X509_name_entry_st’} [-fpermissive]
| 87 | X509_NAME_ENTRY * common_name_entry = X509_NAME_get_entry(X509_get_subject_name(cert), common_name_loc);
| | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | const X509_NAME_ENTRY* {aka const X509_name_entry_st*}
| /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:93:62: error: invalid conversion from ‘const ASN1_STRING’ {aka ‘const asn1_string_st’} to ‘ASN1_STRING’ {aka ‘asn1_string_st’} [-fpermissive]
| 93 | ASN1_STRING * common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
| | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
| | |
| | const ASN1_STRING* {aka const asn1_string_st*}
| /build/reproducible-path/websocketpp-0.8.2+git20250909/examples/print_client_tls/print_client_tls.cpp:101:46: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
| 101 | if (ASN1_STRING_length(common_name_asn1) != strlen(common_name_str)) {
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
| make[3]: *** [examples/print_client_tls/CMakeFiles/print_client_tls.dir/build.make:82: examples/print_client_tls/CMakeFiles/print_client_tls.dir/print_client_tls.cpp.o] Error 1