8000 tls/tls_add_crlpem: use const by sreimers · Pull Request #276 · baresip/re · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tls/tls_add_crlpem: use const #276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/re_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int tls_add_ca(struct tls *tls, const char *cafile);
int tls_add_cafile_path(struct tls *tls, const char *cafile,
const char *capath);
int tls_add_capem(struct tls *tls, const char *capem);
int tls_add_crlpem(struct tls *tls, const char *pem);
int tls_add_crlpem(const struct tls *tls, const char *pem);
int tls_set_selfsigned(struct tls *tls, const char *cn);
int tls_set_selfsigned_rsa(struct tls *tls, const char *cn, size_t bits);
int tls_set_selfsigned_ec(struct tls *tls, const char *cn,
Expand Down
4 changes: 2 additions & 2 deletions src/tls/openssl/tls.c
7C53
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ int tls_add_capem(struct tls *tls, const char *capem)
*
* @return 0 if success, otherwise errorcode
*/
int tls_add_crlpem(struct tls *tls, const char *pem)
int tls_add_crlpem(const struct tls *tls, const char *pem)
{
X509_STORE *store;
X509_CRL *crl;
Expand All @@ -398,7 +398,7 @@ int tls_add_crlpem(struct tls *tls, const char *pem)
if (!store)
return EINVAL;

bio = BIO_new_mem_buf((char *)pem, (int)strlen(pem));
bio = BIO_new_mem_buf(pem, (int)strlen(pem));
if (!bio)
return EINVAL;

Expand Down
0