implicit declaration of base64_decode fix

This commit is contained in:
Václav Šmejkal 2025-02-02 15:15:08 +01:00
parent 2649709c41
commit 5cbb9375dd
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -190,7 +190,7 @@ why2_bool why2_chat_ecc_verify_signature(char *message, char *signature, EVP_PKE
{ {
//VARIABLES //VARIABLES
size_t length; size_t length;
char *decoded_signature = base64_decode(signature, &length); //DECODE SIGNATURE char *decoded_signature = why2_chat_base64_decode(signature, &length); //DECODE SIGNATURE
why2_bool returning; why2_bool returning;
//INIT CONTEXT //INIT CONTEXT
@ -247,7 +247,7 @@ EVP_PKEY* why2_chat_ecc_deserialize_public_key(char *pubkey)
//VARIABLES //VARIABLES
BIO *bio; BIO *bio;
EVP_PKEY *key; EVP_PKEY *key;
char *base64_decoded = base64_decode(pubkey, NULL); char *base64_decoded = why2_chat_base64_decode(pubkey, NULL);
//EXTRACT KEY //EXTRACT KEY
bio = BIO_new_mem_buf(base64_decoded, -1); bio = BIO_new_mem_buf(base64_decoded, -1);
@ -265,7 +265,7 @@ char *why2_chat_ecc_shared_key(char *ecc_key)
size_t key_length; size_t key_length;
char *secret = NULL; char *secret = NULL;
size_t secret_len; size_t secret_len;
char *recipient_pubkey_decoded = base64_decode(ecc_key, &key_length); //DECODE key char *recipient_pubkey_decoded = why2_chat_base64_decode(ecc_key, &key_length); //DECODE key
char *sym_key; char *sym_key;
BIO *bio = BIO_new_mem_buf(recipient_pubkey_decoded, -1); BIO *bio = BIO_new_mem_buf(recipient_pubkey_decoded, -1);
EVP_PKEY *recipient_pubkey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL); EVP_PKEY *recipient_pubkey = PEM_read_bio_PUBKEY(bio, NULL, NULL, NULL);