Skip to content

Commit 362ffae

Browse files
tedjpooledcillera
authored andcommitted
Remove warnings about constness
Signed-off-by: Ted Poole <[email protected]>
1 parent a3e71c1 commit 362ffae

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

bssl-compat/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,10 @@ add_library(bssl-compat STATIC
196196
source/stack.c
197197
source/TLS_VERSION_to_string.cc
198198
source/TLS_with_buffers_method.cc
199+
source/X509_EXTENSION_get_object.cc
199200
source/X509_EXTENSION_get_data.cc
201+
source/X509_alias_get0.cc
202+
source/X509_get_pubkey.cc
200203
source/X509_sign.cc
201204
source/X509_STORE_CTX_get0_untrusted.cc
202205
source/X509_STORE_CTX_init.cc
@@ -601,7 +604,6 @@ target_add_bssl_function(bssl-compat
601604
TLS_method
602605
TLS_server_method
603606
X509_add1_ext_i2d
604-
X509_alias_get0
605607
X509_check_purpose
606608
X509_cmp
607609
X509_CRL_cmp
@@ -614,7 +616,6 @@ target_add_bssl_function(bssl-compat
614616
X509_CRL_up_ref
615617
X509_CRL_verify
616618
X509_digest
617-
X509_EXTENSION_get_object
618619
X509_free
619620
X509_get_ext
620621
X509_get_ext_by_NID
@@ -625,7 +626,6 @@ target_add_bssl_function(bssl-compat
625626
X509_get_issuer_name
626627
X509_get_key_usage
627628
X509_get_pathlen
628-
X509_get_pubkey
629629
X509_get_serialNumber
630630
X509_get_subject_name
631631
X509_get_X509_PUBKEY
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <openssl/x509.h>
2+
#include <ossl.h>
3+
4+
5+
ASN1_OBJECT *X509_EXTENSION_get_object(const X509_EXTENSION *ex) {
6+
return ossl.ossl_X509_EXTENSION_get_object(const_cast<X509_EXTENSION*>(ex));
7+
}

bssl-compat/source/X509_alias_get0.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <openssl/x509.h>
2+
#include <ossl.h>
3+
4+
5+
const uint8_t *X509_alias_get0(const X509 *x509, int *out_len) {
6+
return ossl.ossl_X509_alias_get0(const_cast<X509*>(x509), out_len);
7+
}

bssl-compat/source/X509_get_pubkey.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <openssl/x509.h>
2+
#include <ossl.h>
3+
4+
5+
EVP_PKEY *X509_get_pubkey(const X509 *x509) {
6+
return ossl.ossl_X509_get_pubkey(const_cast<X509*>(x509));
7+
}

0 commit comments

Comments
 (0)