[asterisk-commits] chan_iax2: Allow compiling without OpenSSL. (asterisk[18])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 11 04:11:37 CDT 2022


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/18743 )

Change subject: chan_iax2: Allow compiling without OpenSSL.
......................................................................

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
---
M channels/chan_iax2.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  George Joseph: Looks good to me, approved



diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 210c344..6ff1896 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6381,6 +6381,7 @@
 
 static int invalid_key(ast_aes_decrypt_key *ecx)
 {
+#ifdef HAVE_OPENSSL
 	int i;
 	for (i = 0; i < 60; i++) {
 		if (ecx->rd_key[i]) {
@@ -6389,6 +6390,9 @@
 	}
 	/* if ast_aes_encrypt or ast_aes_decrypt is called, then we'll crash when calling AES_encrypt or AES_decrypt */
 	return -1;
+#else
+	return 0; /* Can't verify, but doesn't matter anyways */
+#endif
 }
 
 static void build_encryption_keys(const unsigned char *digest, struct chan_iax2_pvt *pvt)

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18743
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Iad05c1a9a8bd2a48e7edf8d234eaa9f80779e34d
Gerrit-Change-Number: 18743
Gerrit-PatchSet: 2
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20220711/828f6bdc/attachment-0001.html>


More information about the asterisk-commits mailing list