Asterisk - The Open Source Telephony Project
18.5.0
|
Generate security events in the SIP channel. More...
#include "sip.h"
Go to the source code of this file.
Functions | |
void | sip_digest_parser (char *c, struct digestkeys *keys) |
Takes the digest response and parses it. More... | |
void | sip_report_auth_success (const struct sip_pvt *p, uint32_t using_password) |
void | sip_report_chal_sent (const struct sip_pvt *p) |
void | sip_report_failed_acl (const struct sip_pvt *p, const char *aclname) |
void | sip_report_failed_challenge_response (const struct sip_pvt *p, const char *response, const char *expected_response) |
void | sip_report_inval_password (const struct sip_pvt *p, const char *responsechallenge, const char *responsehash) |
void | sip_report_inval_transport (const struct sip_pvt *p, const char *transport) |
void | sip_report_invalid_peer (const struct sip_pvt *p) |
int | sip_report_security_event (const char *peer, struct ast_sockaddr *addr, const struct sip_pvt *p, const struct sip_request *req, const int res) |
void | sip_report_session_limit (const struct sip_pvt *p) |
Generate security events in the SIP channel.
Definition in file channels/sip/include/security_events.h.
void sip_digest_parser | ( | char * | c, |
struct digestkeys * | keys | ||
) |
Takes the digest response and parses it.
Definition at line 17309 of file chan_sip.c.
References ast_skip_blanks(), c, digestkeys::key, NULL, digestkeys::s, and strsep().
Referenced by check_auth(), and sip_report_security_event().
void sip_report_auth_success | ( | const struct sip_pvt * | p, |
uint32_t | using_password | ||
) |
Definition at line 123 of file channels/sip/security_events.c.
References AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_SUCCESSFUL_AUTH, AST_SECURITY_EVENT_SUCCESSFUL_AUTH_VERSION, ast_security_event_successful_auth::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::ourip, sip_pvt::sa, security_event_get_transport(), and ast_security_event_successful_auth::using_password.
Referenced by sip_report_security_event().
void sip_report_chal_sent | ( | const struct sip_pvt * | p | ) |
Definition at line 210 of file channels/sip/security_events.c.
References ast_copy_string(), AST_SEC_EVT, AST_SECURITY_EVENT_CHAL_SENT, AST_SECURITY_EVENT_CHAL_SENT_VERSION, ast_security_event_report(), ast_strlen_zero, ast_security_event_chal_sent::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::from, sip_pvt::nonce, sip_pvt::ourip, sip_pvt::sa, and security_event_get_transport().
Referenced by sip_report_security_event().
void sip_report_failed_acl | ( | const struct sip_pvt * | p, |
const char * | aclname | ||
) |
Definition at line 68 of file channels/sip/security_events.c.
References AST_SEC_EVT, AST_SECURITY_EVENT_FAILED_ACL, AST_SECURITY_EVENT_FAILED_ACL_VERSION, ast_security_event_report(), ast_security_event_failed_acl::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::ourip, sip_pvt::sa, and security_event_get_transport().
Referenced by handle_request_invite(), and sip_report_security_event().
void sip_report_failed_challenge_response | ( | const struct sip_pvt * | p, |
const char * | response, | ||
const char * | expected_response | ||
) |
Definition at line 174 of file channels/sip/security_events.c.
References ast_copy_string(), AST_SEC_EVT, AST_SECURITY_EVENT_CHAL_RESP_FAILED, AST_SECURITY_EVENT_CHAL_RESP_FAILED_VERSION, ast_security_event_report(), ast_strlen_zero, ast_security_event_chal_resp_failed::common, ast_security_event_common::event_type, ast_security_event_chal_resp_failed::expected_response, sip_pvt::exten, sip_pvt::from, sip_pvt::nonce, sip_pvt::ourip, ast_security_event_chal_resp_failed::response, sip_pvt::sa, and security_event_get_transport().
Referenced by sip_report_security_event().
void sip_report_inval_password | ( | const struct sip_pvt * | p, |
const char * | responsechallenge, | ||
const char * | responsehash | ||
) |
Definition at line 94 of file channels/sip/security_events.c.
References AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_PASSWORD, AST_SECURITY_EVENT_INVAL_PASSWORD_VERSION, ast_security_event_report(), ast_security_event_inval_password::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::nonce, sip_pvt::ourip, sip_pvt::sa, and security_event_get_transport().
Referenced by sip_report_security_event().
void sip_report_inval_transport | ( | const struct sip_pvt * | p, |
const char * | transport | ||
) |
Definition at line 244 of file channels/sip/security_events.c.
References AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_TRANSPORT, AST_SECURITY_EVENT_INVAL_TRANSPORT_VERSION, ast_security_event_report(), ast_security_event_inval_transport::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::ourip, sip_pvt::sa, security_event_get_transport(), and ast_security_event_inval_transport::transport.
Referenced by sip_report_security_event().
void sip_report_invalid_peer | ( | const struct sip_pvt * | p | ) |
Definition at line 43 of file channels/sip/security_events.c.
References AST_SEC_EVT, AST_SECURITY_EVENT_INVAL_ACCT_ID, AST_SECURITY_EVENT_INVAL_ACCT_ID_VERSION, ast_security_event_report(), ast_security_event_inval_acct_id::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::ourip, sip_pvt::sa, and security_event_get_transport().
Referenced by sip_report_security_event().
int sip_report_security_event | ( | const char * | peer, |
struct ast_sockaddr * | addr, | ||
const struct sip_pvt * | p, | ||
const struct sip_request * | req, | ||
const int | res | ||
) |
Definition at line 271 of file channels/sip/security_events.c.
References ast_str_buffer(), ast_str_set(), ast_str_thread_get(), ast_strlen_zero, AUTH_ACL_FAILED, AUTH_BAD_TRANSPORT, AUTH_CHALLENGE_SENT, AUTH_DONT_KNOW, AUTH_NOT_FOUND, AUTH_PEER_NOT_DYNAMIC, AUTH_RTP_FAILED, AUTH_SECRET_FAILED, AUTH_SESSION_LIMIT, AUTH_SUCCESSFUL, AUTH_UNKNOWN_DOMAIN, AUTH_USERNAME_MISMATCH, buf, c, check_auth_buf, CHECK_AUTH_BUF_INITLEN, FALSE, FINDPEERS, K_LAST, K_NONCE, K_RESP, K_URI, K_USER, sip_peer::md5secret, NULL, result, digestkeys::s, sip_peer::secret, sip_auth_headers(), sip_digest_parser(), sip_find_peer(), sip_get_header(), sip_get_transport(), sip_report_auth_success(), sip_report_chal_sent(), sip_report_failed_acl(), sip_report_failed_challenge_response(), sip_report_inval_password(), sip_report_inval_transport(), sip_report_invalid_peer(), sip_report_session_limit(), sip_unref_peer, sip_request::socket, sip_pvt::socket, TRUE, sip_socket::type, sip_peer::username, and WWW_AUTH.
Referenced by handle_incoming().
void sip_report_session_limit | ( | const struct sip_pvt * | p | ) |
Definition at line 149 of file channels/sip/security_events.c.
References AST_SEC_EVT, ast_security_event_report(), AST_SECURITY_EVENT_SESSION_LIMIT, AST_SECURITY_EVENT_SESSION_LIMIT_VERSION, ast_security_event_session_limit::common, ast_security_event_common::event_type, sip_pvt::exten, sip_pvt::ourip, sip_pvt::sa, and security_event_get_transport().
Referenced by sip_report_security_event().