[Asterisk-code-review] res_stir_shaken: Include OpenSSL headers where used actually. (asterisk[16])

George Joseph asteriskteam at digium.com
Mon Nov 9 08:35:53 CST 2020


George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/15115 )

Change subject: res_stir_shaken: Include OpenSSL headers where used actually.
......................................................................

res_stir_shaken: Include OpenSSL headers where used actually.

This avoids the inclusion of the OpenSSL headers in the public header,
which avoids one external library dependency in res_pjsip_stir_shaken.

Change-Id: I6a07e2d81d2b5442e24e99b8cc733a99f881dcf4
---
M include/asterisk/res_stir_shaken.h
M res/res_pjsip_stir_shaken.c
M res/res_stir_shaken.c
M res/res_stir_shaken/stir_shaken.c
4 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/include/asterisk/res_stir_shaken.h b/include/asterisk/res_stir_shaken.h
index cad9282..34d58a3 100644
--- a/include/asterisk/res_stir_shaken.h
+++ b/include/asterisk/res_stir_shaken.h
@@ -18,9 +18,6 @@
 #ifndef _RES_STIR_SHAKEN_H
 #define _RES_STIR_SHAKEN_H
 
-#include <openssl/evp.h>
-#include <openssl/pem.h>
-
 #define STIR_SHAKEN_ENCRYPTION_ALGORITHM "ES256"
 #define STIR_SHAKEN_PPT "shaken"
 #define STIR_SHAKEN_TYPE "passport"
diff --git a/res/res_pjsip_stir_shaken.c b/res/res_pjsip_stir_shaken.c
index de24b26..24d3670 100644
--- a/res/res_pjsip_stir_shaken.c
+++ b/res/res_pjsip_stir_shaken.c
@@ -17,7 +17,6 @@
  */
 
 /*** MODULEINFO
-	<depend>crypto</depend>
 	<depend>pjproject</depend>
 	<depend>res_pjsip</depend>
 	<depend>res_pjsip_session</depend>
diff --git a/res/res_stir_shaken.c b/res/res_stir_shaken.c
index 30326d36..a9f861b 100644
--- a/res/res_stir_shaken.c
+++ b/res/res_stir_shaken.c
@@ -25,6 +25,8 @@
 
 #include "asterisk.h"
 
+#include <openssl/evp.h>
+
 #include "asterisk/module.h"
 #include "asterisk/sorcery.h"
 #include "asterisk/time.h"
diff --git a/res/res_stir_shaken/stir_shaken.c b/res/res_stir_shaken/stir_shaken.c
index 220104a..0b38732 100644
--- a/res/res_stir_shaken/stir_shaken.c
+++ b/res/res_stir_shaken/stir_shaken.c
@@ -23,6 +23,9 @@
 
 #include "asterisk.h"
 
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+
 #include "asterisk/cli.h"
 #include "asterisk/sorcery.h"
 

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

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I6a07e2d81d2b5442e24e99b8cc733a99f881dcf4
Gerrit-Change-Number: 15115
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201109/ad93e8dc/attachment.html>


More information about the asterisk-code-review mailing list