Commit 659894a
tls/openssl: build with the constified X509 name accessors in OpenSSL 4
OpenSSL 4.0 changed X509_get_subject_name() and X509_get_issuer_name() to
return a const X509_NAME *, so assigning the result to a plain
X509_NAME * fails the -Wignored-qualifiers -Werror build:
openssl-x509.c:140:20: error: assignment discards 'const' qualifier
from pointer target type [-Werror=discarded-qualifiers]
Make the read-only users const, and cast at the two sites that fill in
the subject name of a cert that has not been signed yet. All of this
also compiles against OpenSSL 3, where the accessors return non-const.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>1 parent 7eb8c9c commit 659894a
3 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
644 | 644 | | |
645 | 645 | | |
646 | 646 | | |
647 | | - | |
| 647 | + | |
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
944 | 948 | | |
945 | 949 | | |
946 | 950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| |||
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
1023 | | - | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
1024 | 1028 | | |
1025 | 1029 | | |
1026 | 1030 | | |
| |||
0 commit comments