Skip to content

Fix examples build with Openssl 4.0#1195

Open
LocutusOfBorg wants to merge 1 commit into
zaphoyd:masterfrom
LocutusOfBorg:patch-4
Open

Fix examples build with Openssl 4.0#1195
LocutusOfBorg wants to merge 1 commit into
zaphoyd:masterfrom
LocutusOfBorg:patch-4

Conversation

@LocutusOfBorg

Copy link
Copy Markdown
Contributor

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

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
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

Successfully merging this pull request may close these issues.

1 participant