From a8cd80279624c8c4b1862fa541e009158d6e1981 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Tue, 21 Oct 2008 14:29:47 +0000 Subject: Ticket #558: Added srtp_deinit() function and registered this with pj_atexit(). git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2353 74dad513-b988-da41-8d7b-12977e46ad98 --- third_party/srtp/include/srtp.h | 10 ++++++++++ third_party/srtp/srtp/srtp.c | 9 +++++++++ 2 files changed, 19 insertions(+) (limited to 'third_party') diff --git a/third_party/srtp/include/srtp.h b/third_party/srtp/include/srtp.h index bb9387f3..9fd3a575 100644 --- a/third_party/srtp/include/srtp.h +++ b/third_party/srtp/include/srtp.h @@ -257,6 +257,16 @@ typedef struct srtp_stream_ctx_t *srtp_stream_t; err_status_t srtp_init(void); +/** + * @brief srtp_deinit() deinitializes the srtp library. + * + * @warning This function @b must be called on quitting application or + * after srtp is no longer used. + */ + +err_status_t +srtp_deinit(void); + /** * @brief srtp_protect() is the Secure RTP sender-side packet processing * function. diff --git a/third_party/srtp/srtp/srtp.c b/third_party/srtp/srtp/srtp.c index f2445558..b30f6d38 100644 --- a/third_party/srtp/srtp/srtp.c +++ b/third_party/srtp/srtp/srtp.c @@ -1102,6 +1102,15 @@ srtp_init() { return err_status_ok; } +err_status_t +srtp_deinit() { + err_status_t status; + + status = crypto_kernel_shutdown(); + + return status; +} + /* * The following code is under consideration for removal. See * SRTP_MAX_TRAILER_LEN -- cgit v1.2.3