mirror of
https://github.com/curl/curl.git
synced 2026-07-30 20:58:06 +03:00
examples/usercertinmem: avoid stripping const
This API started accepting a const somewhere between OpenSSL 1.0.2b and 1.0.2t. It means this example, like the other similar one now works best with those versions or newer: ``` docs/examples/usercertinmem.c💯33: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] 100 | bio = BIO_new_mem_buf((char *)mypem, -1); | ^ docs/examples/usercertinmem.c:121:34: error: cast from 'const char *' to 'char *' drops const qualifier [-Werror,-Wcast-qual] 121 | kbio = BIO_new_mem_buf((char *)mykey, -1); | ^ ``` Closes #18908
This commit is contained in:
parent
783df22e59
commit
4a6bdd5899
1 changed files with 2 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
|
|||
(void)pointer;
|
||||
|
||||
/* get a BIO */
|
||||
bio = BIO_new_mem_buf((char *)mypem, -1);
|
||||
bio = BIO_new_mem_buf(mypem, -1);
|
||||
|
||||
if(!bio) {
|
||||
printf("BIO_new_mem_buf failed\n");
|
||||
|
|
@ -118,7 +118,7 @@ static CURLcode sslctx_function(CURL *curl, void *sslctx, void *pointer)
|
|||
}
|
||||
|
||||
/* create a bio for the RSA key */
|
||||
kbio = BIO_new_mem_buf((char *)mykey, -1);
|
||||
kbio = BIO_new_mem_buf(mykey, -1);
|
||||
if(!kbio) {
|
||||
printf("BIO_new_mem_buf failed\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue