mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-raop: fix compilation
This commit is contained in:
parent
8167e1b9be
commit
114e678243
1 changed files with 5 additions and 3 deletions
|
|
@ -1093,7 +1093,7 @@ static int rsa_encrypt(uint8_t *data, int len, uint8_t *enc)
|
||||||
{
|
{
|
||||||
uint8_t modulus[256];
|
uint8_t modulus[256];
|
||||||
uint8_t exponent[8];
|
uint8_t exponent[8];
|
||||||
size_t size, msize, esize;
|
size_t msize, esize;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
char n[] =
|
char n[] =
|
||||||
"59dE8qLieItsH1WgjrcFRKj6eUWqi+bGLOX1HL3U3GhC/j0Qg90u3sG/1CUtwC"
|
"59dE8qLieItsH1WgjrcFRKj6eUWqi+bGLOX1HL3U3GhC/j0Qg90u3sG/1CUtwC"
|
||||||
|
|
@ -1112,6 +1112,7 @@ static int rsa_encrypt(uint8_t *data, int len, uint8_t *enc)
|
||||||
EVP_PKEY_CTX *ctx = NULL;
|
EVP_PKEY_CTX *ctx = NULL;
|
||||||
OSSL_PARAM params[5];
|
OSSL_PARAM params[5];
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
size_t size;
|
||||||
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
swap_bytes(modulus, msize);
|
swap_bytes(modulus, msize);
|
||||||
|
|
@ -1150,8 +1151,9 @@ done:
|
||||||
BIGNUM *n_bn = BN_bin2bn(modulus, msize, NULL);
|
BIGNUM *n_bn = BN_bin2bn(modulus, msize, NULL);
|
||||||
BIGNUM *e_bn = BN_bin2bn(exponent, esize, NULL);
|
BIGNUM *e_bn = BN_bin2bn(exponent, esize, NULL);
|
||||||
RSA_set0_key(rsa, n_bn, e_bn, NULL);
|
RSA_set0_key(rsa, n_bn, e_bn, NULL);
|
||||||
size = RSA_public_encrypt(len, data, res, rsa, RSA_PKCS1_OAEP_PADDING);
|
res = RSA_public_encrypt(len, data, enc, rsa, RSA_PKCS1_OAEP_PADDING);
|
||||||
res = size <= 0 ? -EIO : size;
|
if (res <= 0)
|
||||||
|
goto error;
|
||||||
done:
|
done:
|
||||||
if (rsa != NULL)
|
if (rsa != NULL)
|
||||||
RSA_free(rsa);
|
RSA_free(rsa);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue