Skip to content

Commit 5f60caa

Browse files
InterLinked1jcolp
authored andcommitted
chan_iax2: Allow compiling without OpenSSL.
ASTERISK_30007 accidentally made OpenSSL a required depdendency. This adds an ifdef so the relevant code is compiled only if OpenSSL is available, since it only needs to be executed if OpenSSL is available anyways. ASTERISK-30083 #close Change-Id: Iad05c1a9a8bd2a48e7edf8d234eaa9f80779e34d
1 parent 68bcf4c commit 5f60caa

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

channels/chan_iax2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6381,6 +6381,7 @@ static void build_rand_pad(unsigned char *buf, ssize_t len)
63816381

63826382
static int invalid_key(ast_aes_decrypt_key *ecx)
63836383
{
6384+
#ifdef HAVE_OPENSSL
63846385
int i;
63856386
for (i = 0; i < 60; i++) {
63866387
if (ecx->rd_key[i]) {
@@ -6389,6 +6390,9 @@ static int invalid_key(ast_aes_decrypt_key *ecx)
63896390
}
63906391
/* if ast_aes_encrypt or ast_aes_decrypt is called, then we'll crash when calling AES_encrypt or AES_decrypt */
63916392
return -1;
6393+
#else
6394+
return 0; /* Can't verify, but doesn't matter anyways */
6395+
#endif
63926396
}
63936397

63946398
static void build_encryption_keys(const unsigned char *digest, struct chan_iax2_pvt *pvt)

0 commit comments

Comments
 (0)