summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2011-09-22 16:35:20 +0000
committerJonathan Rose <jrose@digium.com>2011-09-22 16:35:20 +0000
commit5982bdcb7c45d286ac7a84ab53fb4a74207d2467 (patch)
treef11f01927951a0d59f5808497d59cdfd5e2cdb66 /include/asterisk
parent8a74aa9ef991ca21d31bc8278f771fa9e0dbdc6d (diff)
Merged revisions 337595,337597 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r337595 | jrose | 2011-09-22 10:35:50 -0500 (Thu, 22 Sep 2011) | 12 lines Generate Security events in chan_sip using new Security Events Framework Security Events Framework was added in 1.8 and support was added for AMI to generate events at that time. This patch adds support for chan_sip to generate security events. (closes issue ASTERISK-18264) Reported by: Michael L. Young Patches: security_events_chan_sip_v4.patch (license #5026) by Michael L. Young Review: https://reviewboard.asterisk.org/r/1362/ ........ r337597 | jrose | 2011-09-22 10:47:05 -0500 (Thu, 22 Sep 2011) | 10 lines Forgot to svn add new files to r337595 Part of Generating security events for chan_sip (issue ASTERISK-18264) Reported by: Michael L. Young Patches: security_events_chan_sip_v4.patch (License #5026) by Michael L. Young Reviewboard: https://reviewboard.asterisk.org/r/1362/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@337600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/event_defs.h7
-rw-r--r--include/asterisk/security_events_defs.h76
2 files changed, 80 insertions, 3 deletions
diff --git a/include/asterisk/event_defs.h b/include/asterisk/event_defs.h
index 073d67bc6..4d1892256 100644
--- a/include/asterisk/event_defs.h
+++ b/include/asterisk/event_defs.h
@@ -283,8 +283,13 @@ enum ast_event_ie_type {
AST_EVENT_IE_CHALLENGE = 0x0032,
AST_EVENT_IE_RESPONSE = 0x0033,
AST_EVENT_IE_EXPECTED_RESPONSE = 0x0034,
+ AST_EVENT_IE_RECEIVED_CHALLENGE = 0x0035,
+ AST_EVENT_IE_RECEIVED_HASH = 0x0036,
+ AST_EVENT_IE_USING_PASSWORD = 0x0037,
+ AST_EVENT_IE_ATTEMPTED_TRANSPORT = 0x0038,
+
/*! \brief Must be the last IE value +1 */
- AST_EVENT_IE_TOTAL = 0x0035,
+ AST_EVENT_IE_TOTAL = 0x0039,
};
/*!
diff --git a/include/asterisk/security_events_defs.h b/include/asterisk/security_events_defs.h
index e39cf312d..61134e29c 100644
--- a/include/asterisk/security_events_defs.h
+++ b/include/asterisk/security_events_defs.h
@@ -111,7 +111,17 @@ enum ast_security_event_type {
* \brief An attempt at basic password authentication failed
*/
AST_SECURITY_EVENT_INVAL_PASSWORD,
- /* \brief This _must_ stay at the end. */
+ /*!
+ * \brief Challenge was sent out, informational
+ */
+ AST_SECURITY_EVENT_CHAL_SENT,
+ /*!
+ * \brief An attempt to contact a peer on an invalid transport.
+ */
+ AST_SECURITY_EVENT_INVAL_TRANSPORT,
+ /*!
+ * \brief This _must_ stay at the end.
+ */
AST_SECURITY_EVENT_NUM_TYPES
};
@@ -393,6 +403,11 @@ struct ast_security_event_successful_auth {
* \note Account ID required
*/
struct ast_security_event_common common;
+ /*!
+ * \brief Using password - if a password was used or not
+ * \note required, 0 = no, 1 = yes
+ */
+ uint32_t *using_password;
};
/*!
@@ -455,12 +470,69 @@ struct ast_security_event_inval_password {
* \brief Event descriptor version
* \note This _must_ be changed if this event descriptor is changed.
*/
- #define AST_SECURITY_EVENT_INVAL_PASSWORD_VERSION 1
+ #define AST_SECURITY_EVENT_INVAL_PASSWORD_VERSION 2
+ /*!
+ * \brief Common security event descriptor elements
+ * \note Account ID required
+ */
+ struct ast_security_event_common common;
+ /*!
+ * \brief Challenge provided
+ * \note required
+ */
+ const char *challenge;
+ /*!
+ * \brief Challenge received
+ * \note required
+ */
+ const char *received_challenge;
+ /*!
+ * \brief Hash received
+ * \note required
+ */
+ const char *received_hash;
+};
+
+/*!
+ * \brief A challenge was sent out
+ */
+struct ast_security_event_chal_sent {
+ /*!
+ * \brief Event descriptor version
+ * \note This _must_ be changed if this event descriptor is changed.
+ */
+ #define AST_SECURITY_EVENT_CHAL_SENT_VERSION 1
/*!
* \brief Common security event descriptor elements
* \note Account ID required
*/
struct ast_security_event_common common;
+ /*!
+ * \brief Challenge sent
+ * \note required
+ */
+ const char *challenge;
+};
+
+/*!
+ * \brief Attempt to contact peer on invalid transport
+ */
+struct ast_security_event_inval_transport {
+ /*!
+ * \brief Event descriptor version
+ * \note This _must_ be changed if this event descriptor is changed.
+ */
+ #define AST_SECURITY_EVENT_INVAL_TRANSPORT_VERSION 1
+ /*!
+ * \brief Common security event descriptor elements
+ * \note Account ID required
+ */
+ struct ast_security_event_common common;
+ /*!
+ * \brief Attempted transport
+ * \note required
+ */
+ const char *transport;
};
#if defined(__cplusplus) || defined(c_plusplus)