gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_1_3-44-g8cf976c


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_3-44-g8cf976c
Date: Thu, 01 Nov 2012 15:02:46 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=8cf976ce8bd94915509fd80665807db2d954cbc8

The branch, master has been updated
       via  8cf976ce8bd94915509fd80665807db2d954cbc8 (commit)
       via  f43624701c67a914589a151d67bdfb1e3259b2eb (commit)
       via  246cca645f3deeb86909f219a6e25e80ff24b088 (commit)
       via  46a50ce33eb35c822cc5e8ba20602725d8862cf6 (commit)
       via  fed247000deffb4f5b4a3e92c7faa48ebb99e40a (commit)
       via  77f0d70863b9480398b04f908c2d458a21758a1a (commit)
       via  3f057d1f6abd07fde024874e5d09d9ba36904b4b (commit)
       via  1554e587d7b147f0eeb171900beed45a83efbf17 (commit)
       via  dc8ce7e59c3477382fc0036616554d032cad37a3 (commit)
       via  d3c917c6f2fa6e665dca3eb6d26b7e6f4ad77b30 (commit)
      from  083067e630498f274608fa67308cb7dda816ac18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8cf976ce8bd94915509fd80665807db2d954cbc8
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 16:01:59 2012 +0100

    Added test on DTLS SRTP functions.

commit f43624701c67a914589a151d67bdfb1e3259b2eb
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:48:17 2012 +0100

    updated auto-generated files.

commit 246cca645f3deeb86909f219a6e25e80ff24b088
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:42:41 2012 +0100

    documented update and set the copyright to Martin until the formal papers 
are received.

commit 46a50ce33eb35c822cc5e8ba20602725d8862cf6
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:39:41 2012 +0100

    signed-unsigned comparison fixes and removed unused parameter.

commit fed247000deffb4f5b4a3e92c7faa48ebb99e40a
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:38:07 2012 +0100

    Check for errors while setting an SRTP profile.

commit 77f0d70863b9480398b04f908c2d458a21758a1a
Author: Martin Storsjo <address@hidden>
Date:   Thu Nov 1 01:34:55 2012 +0200

    Support SRTP profile negotiation in the client and server tools
    
    The cli/serv-args files haven't been regenerated in the patch,
    to avoid the extra stray changes due to differing autogen versions.
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

commit 3f057d1f6abd07fde024874e5d09d9ba36904b4b
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:34:33 2012 +0100

    Added "Since" field to new functions.

commit 1554e587d7b147f0eeb171900beed45a83efbf17
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Thu Nov 1 15:34:30 2012 +0100

    Made error code consistent with the other text parsing functions.

commit dc8ce7e59c3477382fc0036616554d032cad37a3
Author: Martin Storsjo <address@hidden>
Date:   Thu Nov 1 01:34:54 2012 +0200

    Add support for DTLS-SRTP profile negotiation (RFC 5764)
    
    Signed-off-by: Nikos Mavrogiannopoulos <address@hidden>

commit d3c917c6f2fa6e665dca3eb6d26b7e6f4ad77b30
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed Oct 31 22:51:26 2012 +0100

    better doc

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                              |    9 +
 doc/Makefile.am                                   |   10 +
 doc/invoke-gnutls-cli.texi                        |    3 +-
 doc/invoke-gnutls-serv.texi                       |    3 +-
 doc/protocol/rfc5764.txt                          | 1459 +++++++++++++++++++++
 lib/ext/Makefile.am                               |    2 +-
 lib/ext/srtp.c                                    |  475 +++++++
 lib/ext/{cert_type.h => srtp.h}                   |   20 +-
 lib/gnutls_cert.c                                 |   12 +-
 lib/gnutls_extensions.c                           |    5 +
 lib/gnutls_int.h                                  |    1 +
 lib/gnutls_session.c                              |    2 +
 lib/gnutls_ui.c                                   |    1 +
 lib/includes/gnutls/gnutls.h.in                   |   30 +
 lib/libgnutls.map                                 |    5 +
 src/cli-args.c                                    |  514 ++++----
 src/cli-args.def                                  |    7 +
 src/cli-args.h                                    |  114 +-
 src/cli.c                                         |    9 +
 src/common.c                                      |    7 +-
 src/serv-args.c                                   |  478 ++++----
 src/serv-args.def                                 |    7 +
 src/serv-args.h                                   |  102 +-
 src/serv.c                                        |   10 +
 tests/Makefile.am                                 |    3 +-
 tests/{mini-dtls-heartbeat.c => mini-dtls-srtp.c} |  170 +--
 26 files changed, 2749 insertions(+), 709 deletions(-)
 create mode 100644 doc/protocol/rfc5764.txt
 create mode 100644 lib/ext/srtp.c
 copy lib/ext/{cert_type.h => srtp.h} (70%)
 copy tests/{mini-dtls-heartbeat.c => mini-dtls-srtp.c} (67%)

diff --git a/NEWS b/NEWS
index 20eb366..d4bda8c 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ the available revocation data validity.
 ** libgnutls: Simplified certificate verification by adding
 gnutls_certificate_verify_peers3().
 
+** libgnutls: Added support for extension to establish keys
+for SRTP.
+
 ** gnutls-cli: Added --local-dns option.
 
 ** danetool: Corrected bug that prevented loading PEM files.
@@ -23,6 +26,12 @@ gnutls_session_get_id2: Added
 gnutls_certificate_update_verify_flags: Added
 gnutls_certificate_verify_peers3: Added
 gnutls_certificate_verification_status_print: Added
+gnutls_srtp_set_profile: Added
+gnutls_srtp_set_profile_direct: Added
+gnutls_srtp_get_selected_profile: Added
+gnutls_srtp_get_profile_name: Added
+gnutls_srtp_get_profile_by_name: Added
+gnutls_srtp_profile_t: Added
 GNUTLS_CERT_REVOCATION_DATA_TOO_OLD: Added
 GNUTLS_CERT_REVOCATION_DATA_INVALID: Added
 GNUTLS_CERT_UNEXPECTED_OWNER: Added
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 13e4454..400c183 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1616,6 +1616,16 @@ FUNCS += 
functions/gnutls_srp_set_server_credentials_function
 FUNCS += functions/gnutls_srp_set_server_credentials_function.short
 FUNCS += functions/gnutls_srp_verifier
 FUNCS += functions/gnutls_srp_verifier.short
+FUNCS += functions/gnutls_srtp_get_profile_by_name
+FUNCS += functions/gnutls_srtp_get_profile_by_name.short
+FUNCS += functions/gnutls_srtp_get_profile_name
+FUNCS += functions/gnutls_srtp_get_profile_name.short
+FUNCS += functions/gnutls_srtp_get_selected_profile
+FUNCS += functions/gnutls_srtp_get_selected_profile.short
+FUNCS += functions/gnutls_srtp_set_profile
+FUNCS += functions/gnutls_srtp_set_profile.short
+FUNCS += functions/gnutls_srtp_set_profile_direct
+FUNCS += functions/gnutls_srtp_set_profiles_direct.short
 FUNCS += functions/gnutls_store_commitment
 FUNCS += functions/gnutls_store_commitment.short
 FUNCS += functions/gnutls_store_pubkey
diff --git a/doc/invoke-gnutls-cli.texi b/doc/invoke-gnutls-cli.texi
index 41b9e82..07e2337 100644
--- a/doc/invoke-gnutls-cli.texi
+++ b/doc/invoke-gnutls-cli.texi
@@ -7,7 +7,7 @@
 # 
 # DO NOT EDIT THIS FILE   (invoke-gnutls-cli.texi)
 # 
-# It has been AutoGen-ed  October 13, 2012 at 08:49:25 PM by AutoGen 5.16
+# It has been AutoGen-ed  November  1, 2012 at 03:48:00 PM by AutoGen 5.16
 # From the definitions    ../src/cli-args.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -66,6 +66,7 @@ USAGE:  gnutls-cli [ -<flag> [<val>] | 
--<name>address@hidden| @}<val>] ]... [hostname]
        --mtu=num              Set MTU for datagram TLS
                                 - It must be in the range:
                                   0 to 17000
+       --srtp-profiles=str    Offer SRTP profiles
        --crlf                 Send CR LF instead of LF
        --x509fmtder           Use DER format for certificates to read from
    -f, --fingerprint          Send the openpgp fingerprint, instead of the key
diff --git a/doc/invoke-gnutls-serv.texi b/doc/invoke-gnutls-serv.texi
index aaa7928..1702432 100644
--- a/doc/invoke-gnutls-serv.texi
+++ b/doc/invoke-gnutls-serv.texi
@@ -7,7 +7,7 @@
 # 
 # DO NOT EDIT THIS FILE   (invoke-gnutls-serv.texi)
 # 
-# It has been AutoGen-ed  September 30, 2012 at 04:41:49 PM by AutoGen 5.16
+# It has been AutoGen-ed  November  1, 2012 at 03:47:59 PM by AutoGen 5.16
 # From the definitions    ../src/serv-args.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -50,6 +50,7 @@ USAGE:  gnutls-serv [ -<flag> [<val>] | 
--<name>address@hidden| @}<val>] ]...
        --mtu=num              Set MTU for datagram TLS
                                 - It must be in the range:
                                   0 to 17000
+       --srtp-profiles=str    Offer SRTP profiles
    -a, --disable-client-cert  Do not request a client certificate
    -r, --require-client-cert  Require a client certificate
    -b, --heartbeat            Activate heartbeat support
diff --git a/doc/protocol/rfc5764.txt b/doc/protocol/rfc5764.txt
new file mode 100644
index 0000000..6633f00
--- /dev/null
+++ b/doc/protocol/rfc5764.txt
@@ -0,0 +1,1459 @@
+
+
+
+
+
+
+Internet Engineering Task Force (IETF)                         D. McGrew
+Request for Comments: 5764                                 Cisco Systems
+Category: Standards Track                                    E. Rescorla
+ISSN: 2070-1721                                               RTFM, Inc.
+                                                                May 2010
+
+
+  Datagram Transport Layer Security (DTLS) Extension to Establish Keys
+           for the Secure Real-time Transport Protocol (SRTP)
+
+Abstract
+
+   This document describes a Datagram Transport Layer Security (DTLS)
+   extension to establish keys for Secure RTP (SRTP) and Secure RTP
+   Control Protocol (SRTCP) flows.  DTLS keying happens on the media
+   path, independent of any out-of-band signalling channel present.
+
+Status of This Memo
+
+   This is an Internet Standards Track document.
+
+   This document is a product of the Internet Engineering Task Force
+   (IETF).  It represents the consensus of the IETF community.  It has
+   received public review and has been approved for publication by the
+   Internet Engineering Steering Group (IESG).  Further information on
+   Internet Standards is available in Section 2 of RFC 5741.
+
+   Information about the current status of this document, any errata,
+   and how to provide feedback on it may be obtained at
+   http://www.rfc-editor.org/info/rfc5764.
+
+Copyright Notice
+
+   Copyright (c) 2010 IETF Trust and the persons identified as the
+   document authors.  All rights reserved.
+
+   This document is subject to BCP 78 and the IETF Trust's Legal
+   Provisions Relating to IETF Documents
+   (http://trustee.ietf.org/license-info) in effect on the date of
+   publication of this document.  Please review these documents
+   carefully, as they describe your rights and restrictions with respect
+   to this document.  Code Components extracted from this document must
+   include Simplified BSD License text as described in Section 4.e of
+   the Trust Legal Provisions and are provided without warranty as
+   described in the Simplified BSD License.
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 1]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   This document may contain material from IETF Documents or IETF
+   Contributions published or made publicly available before November
+   10, 2008.  The person(s) controlling the copyright in some of this
+   material may not have granted the IETF Trust the right to allow
+   modifications of such material outside the IETF Standards Process.
+   Without obtaining an adequate license from the person(s) controlling
+   the copyright in such materials, this document may not be modified
+   outside the IETF Standards Process, and derivative works of it may
+   not be created outside the IETF Standards Process, except to format
+   it for publication as an RFC or to translate it into languages other
+   than English.
+
+Table of Contents
+
+   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3
+   2.  Conventions Used In This Document  . . . . . . . . . . . . . .  3
+   3.  Overview of DTLS-SRTP Operation  . . . . . . . . . . . . . . .  4
+   4.  DTLS Extensions for SRTP Key Establishment . . . . . . . . . .  5
+     4.1.  The use_srtp Extension . . . . . . . . . . . . . . . . . .  5
+       4.1.1.  use_srtp Extension Definition  . . . . . . . . . . . .  7
+       4.1.2.  SRTP Protection Profiles . . . . . . . . . . . . . . .  8
+       4.1.3.  srtp_mki value . . . . . . . . . . . . . . . . . . . .  9
+     4.2.  Key Derivation . . . . . . . . . . . . . . . . . . . . . . 10
+     4.3.  Key Scope  . . . . . . . . . . . . . . . . . . . . . . . . 12
+     4.4.  Key Usage Limitations  . . . . . . . . . . . . . . . . . . 12
+   5.  Use of RTP and RTCP over a DTLS-SRTP Channel . . . . . . . . . 13
+     5.1.  Data Protection  . . . . . . . . . . . . . . . . . . . . . 13
+       5.1.1.  Transmission . . . . . . . . . . . . . . . . . . . . . 13
+       5.1.2.  Reception  . . . . . . . . . . . . . . . . . . . . . . 13
+     5.2.  Rehandshake and Rekey  . . . . . . . . . . . . . . . . . . 16
+   6.  Multi-Party RTP Sessions . . . . . . . . . . . . . . . . . . . 17
+   7.  Security Considerations  . . . . . . . . . . . . . . . . . . . 17
+     7.1.  Security of Negotiation  . . . . . . . . . . . . . . . . . 17
+     7.2.  Framing Confusion  . . . . . . . . . . . . . . . . . . . . 17
+     7.3.  Sequence Number Interactions . . . . . . . . . . . . . . . 18
+       7.3.1.  Alerts . . . . . . . . . . . . . . . . . . . . . . . . 18
+       7.3.2.  Renegotiation  . . . . . . . . . . . . . . . . . . . . 18
+     7.4.  Decryption Cost  . . . . . . . . . . . . . . . . . . . . . 19
+   8.  Session Description for RTP/SAVP over DTLS . . . . . . . . . . 19
+   9.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 20
+   10. Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 20
+   11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 21
+     11.1. Normative References . . . . . . . . . . . . . . . . . . . 21
+     11.2. Informative References . . . . . . . . . . . . . . . . . . 21
+   Appendix A.  Overview of DTLS  . . . . . . . . . . . . . . . . . . 23
+   Appendix B.  Performance of Multiple DTLS Handshakes . . . . . . . 24
+
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 2]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+1.  Introduction
+
+   The Secure RTP (SRTP) profile [RFC3711] can provide confidentiality,
+   message authentication, and replay protection to RTP data and RTP
+   Control (RTCP) traffic.  SRTP does not provide key management
+   functionality, but instead depends on external key management to
+   exchange secret master keys, and to negotiate the algorithms and
+   parameters for use with those keys.
+
+   Datagram Transport Layer Security (DTLS) [RFC4347] is a channel
+   security protocol that offers integrated key management, parameter
+   negotiation, and secure data transfer.  Because DTLS data transfer
+   protocol is generic, it is less highly optimized for use with RTP
+   than is SRTP, which has been specifically tuned for that purpose.
+
+   This document describes DTLS-SRTP, a SRTP extension for DTLS that
+   combines the performance and encryption flexibility benefits of SRTP
+   with the flexibility and convenience of DTLS-integrated key and
+   association management.  DTLS-SRTP can be viewed in two equivalent
+   ways: as a new key management method for SRTP, and a new RTP-specific
+   data format for DTLS.
+
+   The key points of DTLS-SRTP are that:
+
+   o  application data is protected using SRTP,
+
+   o  the DTLS handshake is used to establish keying material,
+      algorithms, and parameters for SRTP,
+
+   o  a DTLS extension is used to negotiate SRTP algorithms, and
+
+   o  other DTLS record-layer content types are protected using the
+      ordinary DTLS record format.
+
+   The remainder of this memo is structured as follows.  Section 2
+   describes conventions used to indicate normative requirements.
+   Section 3 provides an overview of DTLS-SRTP operation.  Section 4
+   specifies the DTLS extensions, while Section 5 discusses how RTP and
+   RTCP are transported over a DTLS-SRTP channel.  Section 6 describes
+   use with multi-party sessions.  Section 7 and Section 9 describe
+   Security and IANA considerations.
+
+2.  Conventions Used In This Document
+
+   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
+   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
+   document are to be interpreted as described in [RFC2119].
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 3]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+3.  Overview of DTLS-SRTP Operation
+
+   DTLS-SRTP is defined for point-to-point media sessions, in which
+   there are exactly two participants.  Each DTLS-SRTP session contains
+   a single DTLS association (called a "connection" in TLS jargon), and
+   either two SRTP contexts (if media traffic is flowing in both
+   directions on the same host/port quartet) or one SRTP context (if
+   media traffic is only flowing in one direction).  All SRTP traffic
+   flowing over that pair in a given direction uses a single SRTP
+   context.  A single DTLS-SRTP session only protects data carried over
+   a single UDP source and destination port pair.
+
+   The general pattern of DTLS-SRTP is as follows.  For each RTP or RTCP
+   flow the peers do a DTLS handshake on the same source and destination
+   port pair to establish a DTLS association.  Which side is the DTLS
+   client and which side is the DTLS server must be established via some
+   out-of-band mechanism such as SDP.  The keying material from that
+   handshake is fed into the SRTP stack.  Once that association is
+   established, RTP packets are protected (becoming SRTP) using that
+   keying material.
+
+   RTP and RTCP traffic is usually sent on two separate UDP ports.  When
+   symmetric RTP [RFC4961] is used, two bidirectional DTLS-SRTP sessions
+   are needed, one for the RTP port, one for the RTCP port.  When RTP
+   flows are not symmetric, four unidirectional DTLS-SRTP sessions are
+   needed (for inbound and outbound RTP, and inbound and outbound RTCP).
+
+   Symmetric RTP [RFC4961] is the case in which there are two RTP
+   sessions that have their source and destination ports and addresses
+   reversed, in a manner similar to the way that a TCP connection uses
+   its ports.  Each participant has an inbound RTP session and an
+   outbound RTP session.  When symmetric RTP is used, a single DTLS-SRTP
+   session can protect both of the RTP sessions.  It is RECOMMENDED that
+   symmetric RTP be used with DTLS-SRTP.
+
+   RTP and RTCP traffic MAY be multiplexed on a single UDP port
+   [RFC5761].  In this case, both RTP and RTCP packets may be sent over
+   the same DTLS-SRTP session, halving the number of DTLS-SRTP sessions
+   needed.  This improves the cryptographic performance of DTLS, but may
+   cause problems when RTCP and RTP are subject to different network
+   treatment (e.g., for bandwidth reservation or scheduling reasons).
+
+   Between a single pair of participants, there may be multiple media
+   sessions.  There MUST be a separate DTLS-SRTP session for each
+   distinct pair of source and destination ports used by a media session
+   (though the sessions can share a single DTLS session and hence
+   amortize the initial public key handshake!).
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 4]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   A DTLS-SRTP session may be indicated by an external signaling
+   protocol like SIP.  When the signaling exchange is integrity-
+   protected (e.g., when SIP Identity protection via digital signatures
+   is used), DTLS-SRTP can leverage this integrity guarantee to provide
+   complete security of the media stream.  A description of how to
+   indicate DTLS-SRTP sessions in SIP and SDP [RFC4566], and how to
+   authenticate the endpoints using fingerprints can be found in
+   [RFC5763].
+
+   In a naive implementation, when there are multiple media sessions,
+   there is a new DTLS session establishment (complete with public key
+   cryptography) for each media channel.  For example, a videophone may
+   be sending both an audio stream and a video stream, each of which
+   would use a separate DTLS session establishment exchange, which would
+   proceed in parallel.  As an optimization, the DTLS-SRTP
+   implementation SHOULD use the following strategy: a single DTLS
+   association is established, and all other DTLS associations wait
+   until that connection is established before proceeding with their
+   handshakes.  This strategy allows the later sessions to use DTLS
+   session resumption, which allows the amortization of the expensive
+   public key cryptography operations over multiple DTLS handshakes.
+
+   The SRTP keys used to protect packets originated by the client are
+   distinct from the SRTP keys used to protect packets originated by the
+   server.  All of the RTP sources originating on the client for the
+   same channel use the same SRTP keys, and similarly, all of the RTP
+   sources originating on the server for the same channel use the same
+   SRTP keys.  The SRTP implementation MUST ensure that all of the
+   synchronization source (SSRC) values for all of the RTP sources
+   originating from the same device over the same channel are distinct,
+   in order to avoid the "two-time pad" problem (as described in Section
+   9.1 of RFC 3711).  Note that this is not an issue for separate media
+   streams (on different host/port quartets) that use independent keying
+   material even if an SSRC collision occurs.
+
+4.  DTLS Extensions for SRTP Key Establishment
+
+4.1.  The use_srtp Extension
+
+   In order to negotiate the use of SRTP data protection, clients
+   include an extension of type "use_srtp" in the DTLS extended client
+   hello.  This extension MUST only be used when the data being
+   transported is RTP or RTCP [RFC3550].  The "extension_data" field of
+   this extension contains the list of acceptable SRTP protection
+   profiles, as indicated below.
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 5]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   Servers that receive an extended hello containing a "use_srtp"
+   extension can agree to use SRTP by including an extension of type
+   "use_srtp", with the chosen protection profile in the extended server
+   hello.  This process is shown below.
+
+         Client                                               Server
+
+         ClientHello + use_srtp       -------->
+                                              ServerHello + use_srtp
+                                                        Certificate*
+                                                  ServerKeyExchange*
+                                                 CertificateRequest*
+                                      <--------      ServerHelloDone
+         Certificate*
+         ClientKeyExchange
+         CertificateVerify*
+         [ChangeCipherSpec]
+         Finished                     -------->
+                                                  [ChangeCipherSpec]
+                                      <--------             Finished
+         SRTP packets                 <------->      SRTP packets
+
+   Note that '*' indicates messages that are not always sent in DTLS.
+   The CertificateRequest, client and server Certificates, and
+   CertificateVerify will be sent in DTLS-SRTP.
+
+   Once the "use_srtp" extension is negotiated, the RTP or RTCP
+   application data is protected solely using SRTP.  Application data is
+   never sent in DTLS record-layer "application_data" packets.  Rather,
+   complete RTP or RTCP packets are passed to the DTLS stack, which
+   passes them to the SRTP stack, which protects them appropriately.
+   Note that if RTP/RTCP multiplexing [RFC5761] is in use, this means
+   that RTP and RTCP packets may both be passed to the DTLS stack.
+   Because the DTLS layer does not process the packets, it does not need
+   to distinguish them.  The SRTP stack can use the procedures of
+   [RFC5761] to distinguish RTP from RTCP.
+
+   When the "use_srtp" extension is in effect, implementations must not
+   place more than one application data "record" per datagram.  (This is
+   only meaningful from the perspective of DTLS because SRTP is
+   inherently oriented towards one payload per packet, but this is
+   stated purely for clarification.)
+
+   Data other than RTP/RTCP (i.e., TLS control messages) MUST use
+   ordinary DTLS framing and MUST be placed in separate datagrams from
+   SRTP data.
+
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 6]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   A DTLS-SRTP handshake establishes one or more SRTP crypto contexts;
+   however, they all have the same SRTP Protection Profile and Master
+   Key Identifier (MKI), if any.  MKIs are used solely to distinguish
+   the keying material and protection profiles between distinct
+   handshakes, for instance, due to rekeying.  When an MKI is
+   established in a DTLS-SRTP session, it MUST apply for all of the
+   SSRCs within that session -- though a single endpoint may negotiate
+   multiple DTLS-SRTP sessions due, for instance, to forking.  (Note
+   that RFC 3711 allows packets within the same session but with
+   different SSRCs to use MKIs differently; in contrast, DTLS-SRTP
+   requires that MKIs and the keys that they are associated with have
+   the same meaning and are uniform across the entire SRTP session.)
+
+4.1.1.  use_srtp Extension Definition
+
+   The client MUST fill the extension_data field of the "use_srtp"
+   extension with an UseSRTPData value (see Section 9 for the
+   registration):
+
+      uint8 SRTPProtectionProfile[2];
+
+      struct {
+         SRTPProtectionProfiles SRTPProtectionProfiles;
+         opaque srtp_mki<0..255>;
+      } UseSRTPData;
+
+      SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
+
+   The SRTPProtectionProfiles list indicates the SRTP protection
+   profiles that the client is willing to support, listed in descending
+   order of preference.  The srtp_mki value contains the SRTP Master Key
+   Identifier (MKI) value (if any) that the client will use for his SRTP
+   packets.  If this field is of zero length, then no MKI will be used.
+
+   Note: for those unfamiliar with TLS syntax, "srtp_mki<0..255>"
+   indicates a variable-length value with a length between 0 and 255
+   (inclusive).  Thus, the MKI may be up to 255 bytes long.
+
+   If the server is willing to accept the use_srtp extension, it MUST
+   respond with its own "use_srtp" extension in the ExtendedServerHello.
+   The extension_data field MUST contain a UseSRTPData value with a
+   single SRTPProtectionProfile value that the server has chosen for use
+   with this connection.  The server MUST NOT select a value that the
+   client has not offered.  If there is no shared profile, the server
+   SHOULD NOT return the use_srtp extension at which point the
+   connection falls back to the negotiated DTLS cipher suite.  If that
+   is not acceptable, the server SHOULD return an appropriate DTLS
+   alert.
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 7]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+4.1.2.  SRTP Protection Profiles
+
+   A DTLS-SRTP SRTP Protection Profile defines the parameters and
+   options that are in effect for the SRTP processing.  This document
+   defines the following SRTP protection profiles.
+
+      SRTPProtectionProfile SRTP_AES128_CM_HMAC_SHA1_80 = {0x00, 0x01};
+      SRTPProtectionProfile SRTP_AES128_CM_HMAC_SHA1_32 = {0x00, 0x02};
+      SRTPProtectionProfile SRTP_NULL_HMAC_SHA1_80      = {0x00, 0x05};
+      SRTPProtectionProfile SRTP_NULL_HMAC_SHA1_32      = {0x00, 0x06};
+
+   The following list indicates the SRTP transform parameters for each
+   protection profile.  The parameters cipher_key_length,
+   cipher_salt_length, auth_key_length, and auth_tag_length express the
+   number of bits in the values to which they refer.  The
+   maximum_lifetime parameter indicates the maximum number of packets
+   that can be protected with each single set of keys when the parameter
+   profile is in use.  All of these parameters apply to both RTP and
+   RTCP, unless the RTCP parameters are separately specified.
+
+   All of the crypto algorithms in these profiles are from [RFC3711].
+
+   SRTP_AES128_CM_HMAC_SHA1_80
+         cipher: AES_128_CM
+         cipher_key_length: 128
+         cipher_salt_length: 112
+         maximum_lifetime: 2^31
+         auth_function: HMAC-SHA1
+         auth_key_length: 160
+         auth_tag_length: 80
+   SRTP_AES128_CM_HMAC_SHA1_32
+         cipher: AES_128_CM
+         cipher_key_length: 128
+         cipher_salt_length: 112
+         maximum_lifetime: 2^31
+         auth_function: HMAC-SHA1
+         auth_key_length: 160
+         auth_tag_length: 32
+         RTCP auth_tag_length: 80
+   SRTP_NULL_HMAC_SHA1_80
+         cipher: NULL
+         cipher_key_length: 0
+         cipher_salt_length: 0
+         maximum_lifetime: 2^31
+         auth_function: HMAC-SHA1
+         auth_key_length: 160
+         auth_tag_length: 80
+
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 8]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   SRTP_NULL_HMAC_SHA1_32
+         cipher: NULL
+         cipher_key_length: 0
+         cipher_salt_length: 0
+         maximum_lifetime: 2^31
+         auth_function: HMAC-SHA1
+         auth_key_length: 160
+         auth_tag_length: 32
+         RTCP auth_tag_length: 80
+
+   With all of these SRTP Parameter profiles, the following SRTP options
+   are in effect:
+
+   o  The TLS PseudoRandom Function (PRF) is used to generate keys to
+      feed into the SRTP Key Derivation Function (KDF).  When DTLS 1.2
+      [DTLS1.2] is in use, the PRF is the one associated with the cipher
+      suite.  Note that this specification is compatible with DTLS 1.0
+      or DTLS 1.2
+
+   o  The Key Derivation Rate (KDR) is equal to zero.  Thus, keys are
+      not re-derived based on the SRTP sequence number.
+
+   o  The key derivation procedures from Section 4.3 with the AES-CM PRF
+      from RFC 3711 are used.
+
+   o  For all other parameters (in particular, SRTP replay window size
+      and FEC order), the default values are used.
+
+   If values other than the defaults for these parameters are required,
+   they can be enabled by writing a separate specification specifying
+   SDP syntax to signal them.
+
+   Applications using DTLS-SRTP SHOULD coordinate the SRTP Protection
+   Profiles between the DTLS-SRTP session that protects an RTP flow and
+   the DTLS-SRTP session that protects the associated RTCP flow (in
+   those cases in which the RTP and RTCP are not multiplexed over a
+   common port).  In particular, identical ciphers SHOULD be used.
+
+   New SRTPProtectionProfile values must be defined according to the
+   "Specification Required" policy as defined by RFC 5226 [RFC5226].
+   See Section 9 for IANA Considerations.
+
+4.1.3.  srtp_mki value
+
+   The srtp_mki value MAY be used to indicate the capability and desire
+   to use the SRTP Master Key Identifier (MKI) field in the SRTP and
+   SRTCP packets.  The MKI field indicates to an SRTP receiver which key
+   was used to protect the packet that contains that field.  The
+
+
+
+McGrew & Rescorla            Standards Track                    [Page 9]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   srtp_mki field contains the value of the SRTP MKI which is associated
+   with the SRTP master keys derived from this handshake.  Each SRTP
+   session MUST have exactly one master key that is used to protect
+   packets at any given time.  The client MUST choose the MKI value so
+   that it is distinct from the last MKI value that was used, and it
+   SHOULD make these values unique for the duration of the TLS session.
+
+   Upon receipt of a "use_srtp" extension containing a "srtp_mki" field,
+   the server MUST either (assuming it accepts the extension at all):
+
+   1.  include a matching "srtp_mki" value in its "use_srtp" extension
+       to indicate that it will make use of the MKI, or
+   2.  return an empty "srtp_mki" value to indicate that it cannot make
+       use of the MKI.
+
+   If the client detects a nonzero-length MKI in the server's response
+   that is different than the one the client offered, then the client
+   MUST abort the handshake and SHOULD send an invalid_parameter alert.
+   If the client and server agree on an MKI, all SRTP packets protected
+   under the new security parameters MUST contain that MKI.
+
+   Note that any given DTLS-SRTP session only has a single active MKI
+   (if any).  Thus, at any given time, a set of endpoints will generally
+   only be using one MKI (the major exception is during rehandshakes).
+
+4.2.  Key Derivation
+
+   When SRTP mode is in effect, different keys are used for ordinary
+   DTLS record protection and SRTP packet protection.  These keys are
+   generated using a TLS exporter [RFC5705] to generate
+
+   2 * (SRTPSecurityParams.master_key_len +
+        SRTPSecurityParams.master_salt_len) bytes of data
+
+   which are assigned as shown below.  The per-association context value
+   is empty.
+
+   client_write_SRTP_master_key[SRTPSecurityParams.master_key_len];
+   server_write_SRTP_master_key[SRTPSecurityParams.master_key_len];
+   client_write_SRTP_master_salt[SRTPSecurityParams.master_salt_len];
+   server_write_SRTP_master_salt[SRTPSecurityParams.master_salt_len];
+
+   The exporter label for this usage is "EXTRACTOR-dtls_srtp".  (The
+   "EXTRACTOR" prefix is for historical compatibility.)
+
+   The four keying material values (the master key and master salt for
+   each direction) are provided as inputs to the SRTP key derivation
+   mechanism, as shown in Figure 1 and detailed below.  By default, the
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 10]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   mechanism defined in Section 4.3 of [RFC3711] is used, unless another
+   key derivation mechanism is specified as part of an SRTP Protection
+   Profile.
+
+   The client_write_SRTP_master_key and client_write_SRTP_master_salt
+   are provided to one invocation of the SRTP key derivation function,
+   to generate the SRTP keys used to encrypt and authenticate packets
+   sent by the client.  The server MUST only use these keys to decrypt
+   and to check the authenticity of inbound packets.
+
+   The server_write_SRTP_master_key and server_write_SRTP_master_salt
+   are provided to one invocation of the SRTP key derivation function,
+   to generate the SRTP keys used to encrypt and authenticate packets
+   sent by the server.  The client MUST only use these keys to decrypt
+   and to check the authenticity of inbound packets.
+
+   TLS master
+     secret   label
+      |         |
+      v         v
+   +---------------+
+   | TLS extractor |
+   +---------------+
+          |                                         +------+   SRTP
+          +-> client_write_SRTP_master_key ----+--->| SRTP |-> client
+          |                                    | +->| KDF  |   write
+          |                                    | |  +------+   keys
+          |                                    | |
+          +-> server_write_SRTP_master_key --  | |  +------+   SRTCP
+          |                                  \ \--->|SRTCP |-> client
+          |                                   \  +->| KDF  |   write
+          |                                    | |  +------+   keys
+          +-> client_write_SRTP_master_salt ---|-+
+          |                                    |
+          |                                    |    +------+   SRTP
+          |                                    +--->| SRTP |-> server
+          +-> server_write_SRTP_master_salt -+-|--->| KDF  |   write
+                                             | |    +------+   keys
+                                             | |
+                                             | |    +------+   SRTCP
+                                             | +--->|SRTCP |-> server
+                                             +----->| KDF  |   write
+                                                    +------+   keys
+
+                Figure 1: The derivation of the SRTP keys.
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 11]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   When both RTCP and RTP use the same source and destination ports,
+   then both the SRTP and SRTCP keys are needed.  Otherwise, there are
+   two DTLS-SRTP sessions, one of which protects the RTP packets and one
+   of which protects the RTCP packets; each DTLS-SRTP session protects
+   the part of an SRTP session that passes over a single source/
+   destination transport address pair, as shown in Figure 2, independent
+   of which SSRCs are used on that pair.  When a DTLS-SRTP session is
+   protecting RTP, the SRTCP keys derived from the DTLS handshake are
+   not needed and are discarded.  When a DTLS-SRTP session is protecting
+   RTCP, the SRTP keys derived from the DTLS handshake are not needed
+   and are discarded.
+
+      Client            Server
+     (Sender)         (Receiver)
+   (1)   <----- DTLS ------>    src/dst = a/b and b/a
+         ------ SRTP ------>    src/dst = a/b, uses client write keys
+
+   (2)   <----- DTLS ------>    src/dst = c/d and d/c
+         ------ SRTCP ----->    src/dst = c/d, uses client write keys
+         <----- SRTCP ------    src/dst = d/c, uses server write keys
+
+     Figure 2: A DTLS-SRTP session protecting RTP (1) and another one
+    protecting RTCP (2), showing the transport addresses and keys used.
+
+4.3.  Key Scope
+
+   Because of the possibility of packet reordering, DTLS-SRTP
+   implementations SHOULD store multiple SRTP keys sets during a rekey
+   in order to avoid the need for receivers to drop packets for which
+   they lack a key.
+
+4.4.  Key Usage Limitations
+
+   The maximum_lifetime parameter in the SRTP protection profile
+   indicates the maximum number of packets that can be protected with
+   each single encryption and authentication key.  (Note that, since RTP
+   and RTCP are protected with independent keys, those protocols are
+   counted separately for the purposes of determining when a key has
+   reached the end of its lifetime.)  Each profile defines its own
+   limit.  When this limit is reached, a new DTLS session SHOULD be used
+   to establish replacement keys, and SRTP implementations MUST NOT use
+   the existing keys for the processing of either outbound or inbound
+   traffic.
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 12]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+5.  Use of RTP and RTCP over a DTLS-SRTP Channel
+
+5.1.  Data Protection
+
+   Once the DTLS handshake has completed, the peers can send RTP or RTCP
+   over the newly created channel.  We describe the transmission process
+   first followed by the reception process.
+
+   Within each RTP session, SRTP processing MUST NOT take place before
+   the DTLS handshake completes.
+
+5.1.1.  Transmission
+
+   DTLS and TLS define a number of record content types.  In ordinary
+   TLS/DTLS, all data is protected using the same record encoding and
+   mechanisms.  When the mechanism described in this document is in
+   effect, this is modified so that data written by upper-level protocol
+   clients of DTLS is assumed to be RTP/RTP and is encrypted using SRTP
+   rather than the standard TLS record encoding.
+
+   When a user of DTLS wishes to send an RTP packet in SRTP mode, it
+   delivers it to the DTLS implementation as an ordinary application
+   data write (e.g., SSL_write()).  The DTLS implementation then invokes
+   the processing described in RFC 3711, Sections 3 and 4.  The
+   resulting SRTP packet is then sent directly on the wire as a single
+   datagram with no DTLS framing.  This provides an encapsulation of the
+   data that conforms to and interoperates with SRTP.  Note that the RTP
+   sequence number rather than the DTLS sequence number is used for
+   these packets.
+
+5.1.2.  Reception
+
+   When DTLS-SRTP is used to protect an RTP session, the RTP receiver
+   needs to demultiplex packets that are arriving on the RTP port.
+   Arriving packets may be of types RTP, DTLS, or STUN [RFC5389].  If
+   these are the only types of packets present, the type of a packet can
+   be determined by looking at its first byte.
+
+   The process for demultiplexing a packet is as follows.  The receiver
+   looks at the first byte of the packet.  If the value of this byte is
+   0 or 1, then the packet is STUN.  If the value is in between 128 and
+   191 (inclusive), then the packet is RTP (or RTCP, if both RTCP and
+   RTP are being multiplexed over the same destination port).  If the
+   value is between 20 and 63 (inclusive), the packet is DTLS.  This
+   process is summarized in Figure 3.
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 13]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+                   +----------------+
+                   | 127 < B < 192 -+--> forward to RTP
+                   |                |
+       packet -->  |  19 < B < 64  -+--> forward to DTLS
+                   |                |
+                   |       B < 2   -+--> forward to STUN
+                   +----------------+
+
+    Figure 3: The DTLS-SRTP receiver's packet demultiplexing algorithm.
+         Here the field B denotes the leading byte of the packet.
+
+   If other packet types are to be multiplexed as well, implementors
+   and/or designers SHOULD ensure that they can be demultiplexed from
+   these three packet types.
+
+   In some cases, there will be multiple DTLS-SRTP associations for a
+   given SRTP endpoint.  For instance, if Alice makes a call that is SIP
+   forked to both Bob and Charlie, she will use the same local host/port
+   pair for both of them, as shown in Figure 4, where XXX and YYY
+   represent different DTLS-SRTP associations.  (The SSRCs shown are the
+   ones for data flowing to Alice.)
+
+                                          Bob (192.0.2.1:6666)
+                                         /
+                                        /
+                                       / SSRC=1
+                                      /  DTLS-SRTP=XXX
+                                     /
+                                    v
+               Alice (192.0.2.0:5555)
+                                    ^
+                                     \
+                                      \  SSRC=2
+                                       \ DTLS-SRTP=YYY
+                                        \
+                                         \
+                                          Charlie (192.0.2.2:6666)
+
+                 Figure 4: RTP sessions with SIP forking.
+
+   Because DTLS operates on the host/port quartet, the DTLS association
+   will still complete correctly, with the foreign host/port pair being
+   used, to distinguish the associations.  However, in RTP the source
+   host/port is not used and sessions are identified by the destination
+   host/port and the SSRC.  Thus, some mechanism is needed to determine
+   which SSRCs correspond to which DTLS associations.  The following
+   method SHOULD be used.
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 14]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   For each local host/port pair, the DTLS-SRTP implementation maintains
+   a table listing all the SSRCs it knows about and the DTLS-SRTP
+   associations they correspond to.  Initially, this table is empty.
+   When an SRTP packet is received for a given RTP endpoint (destination
+   IP/port pair), the following procedure is used:
+
+   1.  If the SSRC is already known for that endpoint, then the
+       corresponding DTLS-SRTP association and its keying material is
+       used to decrypt and verify the packet.
+   2.  If the SSRC is not known, then the receiver tries to decrypt it
+       with the keying material corresponding to each DTLS-SRTP
+       association for that endpoint.
+   3.  If the decryption and verification succeeds (the authentication
+       tag verifies), then an entry is placed in the table mapping the
+       SSRC to that association.
+   4.  If the decryption and verification fails, then the packet is
+       silently discarded.
+   5.  When a DTLS-SRTP association is closed (for instance, because the
+       fork is abandoned), its entries MUST be removed from the mapping
+       table.
+
+   The average cost of this algorithm for a single SSRC is the
+   decryption and verification time of a single packet times the number
+   of valid DTLS-SRTP associations corresponding to a single receiving
+   port on the host.  In practice, this means the number of forks; so in
+   the case shown in Figure 4, that would be two.  This cost is only
+   incurred once for any given SSRC, since afterwards that SSRC is
+   placed in the map table and looked up immediately.  As with normal
+   RTP, this algorithm allows new SSRCs to be introduced by the source
+   at any time.  They will automatically be mapped to the correct DTLS
+   association.
+
+   Note that this algorithm explicitly allows multiple SSRCs to be sent
+   from the same address/port pair.  One way in which this can happen is
+   an RTP translator.  This algorithm will automatically assign the
+   SSRCs to the correct associations.  Note that because the SRTP
+   packets are cryptographically protected, such a translator must
+   either share keying material with one endpoint or refrain from
+   modifying the packets in a way which would cause the integrity check
+   to fail.  This is a general property of SRTP and is not specific to
+   DTLS-SRTP.
+
+   There are two error cases that should be considered.  First, if an
+   SSRC collision occurs, then only the packets from the first source
+   will be processed.  When the packets from the second source arrive,
+   the DTLS association with the first source will be used for
+   decryption and verification, which will fail, and the packet will be
+   discarded.  This is consistent with [RFC3550], which permits the
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 15]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   receiver to keep the packets from one source and discard those from
+   the other.  Of course the RFC 3550 SSRC collision detection and
+   handling procedures MUST also be followed.
+
+   Second, there may be cases where a malfunctioning source is sending
+   corrupt packets that cannot be decrypted and verified.  In this case,
+   the SSRC will never be entered into the mapping table because the
+   decryption and verification always fails.  Receivers MAY keep records
+   of unmapped SSRCs that consistently fail decryption and verification
+   and abandon attempts to process them once they reach some limit.
+   That limit MUST be large enough to account for the effects of
+   transmission errors.  Entries MUST be pruned from this table when the
+   relevant SRTP endpoint is deleted (e.g., the call ends) and SHOULD
+   time out faster than that (we do not offer a hard recommendation but
+   10 to 30 seconds seems appropriate) in order to allow for the
+   possibility that the peer implementation has been corrected.
+
+5.2.  Rehandshake and Rekey
+
+   Rekeying in DTLS is accomplished by performing a new handshake over
+   the existing DTLS channel.  That is, the handshake messages are
+   protected by the existing DTLS cipher suite.  This handshake can be
+   performed in parallel with data transport, so no interruption of the
+   data flow is required.  Once the handshake is finished, the newly
+   derived set of keys is used to protect all outbound packets, both
+   DTLS and SRTP.
+
+   Because of packet reordering, packets protected by the previous set
+   of keys can appear on the wire after the handshake has completed.  To
+   compensate for this fact, receivers SHOULD maintain both sets of keys
+   for some time in order to be able to decrypt and verify older
+   packets.  The keys should be maintained for the duration of the
+   maximum segment lifetime (MSL).
+
+   If an MKI is used, then the receiver should use the corresponding set
+   of keys to process an incoming packet.  If no matching MKI is
+   present, the packet MUST be rejected.  Otherwise, when a packet
+   arrives after the handshake completed, a receiver SHOULD use the
+   newly derived set of keys to process that packet unless there is an
+   MKI.  (If the packet was protected with the older set of keys, this
+   fact will become apparent to the receiver as an authentication
+   failure will occur.)  If the authentication check on the packet fails
+   and no MKI is being used, then the receiver MAY process the packet
+   with the older set of keys.  If that authentication check indicates
+   that the packet is valid, the packet should be accepted; otherwise,
+   the packet MUST be discarded and rejected.
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 16]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   Receivers MAY use the SRTP packet sequence number to aid in the
+   selection of keys.  After a packet has been received and
+   authenticated with the new key set, any packets with sequence numbers
+   that are greater will also have been protected with the new key set.
+
+6.  Multi-Party RTP Sessions
+
+   Since DTLS is a point-to-point protocol, DTLS-SRTP is intended only
+   to protect unicast RTP sessions.  This does not preclude its use with
+   RTP mixers.  For example, a conference bridge may use DTLS-SRTP to
+   secure the communication to and from each of the participants in a
+   conference.  However, because each flow between an endpoint and a
+   mixer has its own key, the mixer has to decrypt and then reencrypt
+   the traffic for each recipient.
+
+   A future specification may describe methods for sharing a single key
+   between multiple DTLS-SRTP associations thus allowing conferencing
+   systems to avoid the decrypt/reencrypt stage.  However, any system in
+   which the media is modified (e.g., for level balancing or
+   transcoding) will generally need to be performed on the plaintext and
+   will certainly break the authentication tag, and therefore will
+   require a decrypt/reencrypt stage.
+
+7.  Security Considerations
+
+   The use of multiple data protection framings negotiated in the same
+   handshake creates some complexities, which are discussed here.
+
+7.1.  Security of Negotiation
+
+   One concern here is that attackers might be able to implement a bid-
+   down attack forcing the peers to use ordinary DTLS rather than SRTP.
+   However, because the negotiation of this extension is performed in
+   the DTLS handshake, it is protected by the Finished messages.
+   Therefore, any bid-down attack is automatically detected, which
+   reduces this to a denial-of-service attack -- which can be mounted by
+   any attacker who can control the channel.
+
+7.2.  Framing Confusion
+
+   Because two different framing formats are used, there is concern that
+   an attacker could convince the receiver to treat an SRTP-framed RTP
+   packet as a DTLS record (e.g., a handshake message) or vice versa.
+   This attack is prevented by using different keys for Message
+   Authentication Code (MAC) verification for each type of data.
+   Therefore, this type of attack reduces to being able to forge a
+   packet with a valid MAC, which violates a basic security invariant of
+   both DTLS and SRTP.
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 17]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   As an additional defense against injection into the DTLS handshake
+   channel, the DTLS record type is included in the MAC.  Therefore, an
+   SRTP record would be treated as an unknown type and ignored.  (See
+   Section 6 of [RFC5246].)
+
+7.3.  Sequence Number Interactions
+
+   As described in Section 5.1.1, the SRTP and DTLS sequence number
+   spaces are distinct.  This means that it is not possible to
+   unambiguously order a given DTLS control record with respect to an
+   SRTP packet.  In general, this is relevant in two situations: alerts
+   and rehandshake.
+
+7.3.1.  Alerts
+
+   Because DTLS handshake and change_cipher_spec messages share the same
+   sequence number space as alerts, they can be ordered correctly.
+   Because DTLS alerts are inherently unreliable and SHOULD NOT be
+   generated as a response to data packets, reliable sequencing between
+   SRTP packets and DTLS alerts is not an important feature.  However,
+   implementations that wish to use DTLS alerts to signal problems with
+   the SRTP encoding SHOULD simply act on alerts as soon as they are
+   received and assume that they refer to the temporally contiguous
+   stream.  Such implementations MUST check for alert retransmission and
+   discard retransmitted alerts to avoid overreacting to replay attacks.
+
+7.3.2.  Renegotiation
+
+   Because the rehandshake transition algorithm specified in Section 5.2
+   requires trying multiple sets of keys if no MKI is used, it slightly
+   weakens the authentication.  For instance, if an n-bit MAC is used
+   and k different sets of keys are present, then the MAC is weakened by
+   log_2(k) bits to n - log_2(k).  In practice, since the number of keys
+   used will be very small and the MACs in use are typically strong (the
+   default for SRTP is 80 bits), the decrease in security involved here
+   is minimal.
+
+   Another concern here is that this algorithm slightly increases the
+   work factor on the receiver because it needs to attempt multiple
+   validations.  However, again, the number of potential keys will be
+   very small (and the attacker cannot force it to be larger) and this
+   technique is already used for rollover counter management, so the
+   authors do not consider this to be a serious flaw.
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 18]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+7.4.  Decryption Cost
+
+   An attacker can impose computational costs on the receiver by sending
+   superficially valid SRTP packets that do not decrypt correctly.  In
+   general, encryption algorithms are so fast that this cost is
+   extremely small compared to the bandwidth consumed.  The SSRC-DTLS
+   mapping algorithm described in Section 5.1.2 gives the attacker a
+   slight advantage here because he can force the receiver to do more
+   then one decryption per packet.  However, this advantage is modest
+   because the number of decryptions that the receiver does is limited
+   by the number of associations he has corresponding to a given
+   destination host/port, which is typically quite small.  For
+   comparison, a single 1024-bit RSA private key operation (the typical
+   minimum cost to establish a DTLS-SRTP association) is hundreds of
+   times as expensive as decrypting an SRTP packet.
+
+   Implementations can detect this form of attack by keeping track of
+   the number of SRTP packets that are observed with unknown SSRCs and
+   that fail the authentication tag check.  If under such attack,
+   implementations SHOULD prioritize decryption and verification of
+   packets that either have known SSRCs or come from source addresses
+   that match those of peers with which it has DTLS-SRTP associations.
+
+8.  Session Description for RTP/SAVP over DTLS
+
+   This specification defines new tokens to describe the protocol used
+   in SDP media descriptions ("m=" lines and their associated
+   parameters).  The new values defined for the proto field are:
+
+   o  When a RTP/SAVP or RTP/SAVPF [RFC5124] stream is transported over
+      DTLS with the Datagram Congestion Control Protocol (DCCP), then
+      the token SHALL be DCCP/TLS/RTP/SAVP or DCCP/TLS/RTP/SAVPF
+      respectively.
+
+   o  When a RTP/SAVP or RTP/SAVPF stream is transported over DTLS with
+      UDP, the token SHALL be UDP/TLS/RTP/SAVP or UDP/TLS/RTP/SAVPF
+      respectively.
+
+   The "fmt" parameter SHALL be as defined for RTP/SAVP.
+
+   See [RFC5763] for how to use offer/answer with DTLS-SRTP.
+
+   This document does not specify how to protect RTP data transported
+   over TCP.  Potential approaches include carrying the RTP over TLS
+   over TCP (see [SRTP-NOT-MAND]) or using a mechanism similar to that
+   in this document over TCP, either via TLS or DTLS, with DTLS being
+   used for consistency between reliable and unreliable transports.  In
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 19]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   the latter case, it would be necessary to profile DTLS so that
+   fragmentation and retransmissions no longer occurred.  In either
+   case, a new document would be required.
+
+9.  IANA Considerations
+
+   This document adds a new extension for DTLS, in accordance with
+   [RFC5246]:
+        enum { use_srtp (14) } ExtensionType;
+
+   This extension MUST only be used with DTLS, and not with TLS
+   [RFC4572], which specifies that TLS can be used over TCP but does not
+   address TCP for RTP/SAVP.
+
+   Section 4.1.2 requires that all SRTPProtectionProfile values be
+   defined by RFC 5226 "Specification Required".  IANA has created a
+   DTLS SRTPProtectionProfile registry initially populated with values
+   from Section 4.1.2 of this document.  Future values MUST be allocated
+   via the "Specification Required" profile of [RFC5226].
+
+   This specification updates the "Session Description Protocol (SDP)
+   Parameters" registry as defined in Section 8.2.2 of [RFC4566].
+   Specifically, it adds the following values to the table for the
+   "proto" field.
+
+           Type            SDP Name                     Reference
+           ----            ------------------           ---------
+           proto           UDP/TLS/RTP/SAVP             [RFC5764]
+           proto           DCCP/TLS/RTP/SAVP            [RFC5764]
+
+           proto           UDP/TLS/RTP/SAVPF            [RFC5764]
+           proto           DCCP/TLS/RTP/SAVPF           [RFC5764]
+
+   IANA has registered the "EXTRACTOR-dtls_srtp" value in the TLS
+   Extractor Label Registry to correspond to this specification.
+
+10.  Acknowledgments
+
+   Special thanks to Flemming Andreasen, Francois Audet, Pasi Eronen,
+   Roni Even, Jason Fischl, Cullen Jennings, Colin Perkins, Dan Wing,
+   and Ben Campbell for input, discussions, and guidance.  Pasi Eronen
+   provided Figure 1.
+
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 20]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+11.  References
+
+11.1.  Normative References
+
+   [RFC2119]        Bradner, S., "Key words for use in RFCs to Indicate
+                    Requirement Levels", BCP 14, RFC 2119, March 1997.
+
+   [RFC3711]        Baugher, M., McGrew, D., Naslund, M., Carrara, E.,
+                    and K. Norrman, "The Secure Real-time Transport
+                    Protocol (SRTP)", RFC 3711, March 2004.
+
+   [RFC4347]        Rescorla, E. and N. Modadugu, "Datagram Transport
+                    Layer Security", RFC 4347, April 2006.
+
+   [RFC4961]        Wing, D., "Symmetric RTP / RTP Control Protocol
+                    (RTCP)", BCP 131, RFC 4961, July 2007.
+
+   [RFC5246]        Dierks, T. and E. Rescorla, "The Transport Layer
+                    Security (TLS) Protocol Version 1.2", RFC 5246,
+                    August 2008.
+
+   [RFC5705]        Rescorla, E., "Keying Material Exporters for
+                    Transport Layer Security (TLS)", RFC 5705,
+                    March 2010.
+
+   [RFC5761]        Perkins, C. and M. Westerlund, "Multiplexing RTP
+                    Data and Control Packets on a Single Port",
+                    RFC 5761, April 2010.
+
+11.2.  Informative References
+
+   [DTLS1.2]        Rescorla, E. and N. Modadugu, "Datagram Transport
+                    Layer Security version 1.2", Work in Progress,
+                    October 2009.
+
+   [RFC3550]        Schulzrinne, H., Casner, S., Frederick, R., and V.
+                    Jacobson, "RTP: A Transport Protocol for Real-Time
+                    Applications", STD 64, RFC 3550, July 2003.
+
+   [RFC4566]        Handley, M., Jacobson, V., and C. Perkins, "SDP:
+                    Session Description Protocol", RFC 4566, July 2006.
+
+   [RFC4572]        Lennox, J., "Connection-Oriented Media Transport
+                    over the Transport Layer Security (TLS) Protocol in
+                    the Session Description Protocol (SDP)", RFC 4572,
+                    July 2006.
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 21]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   [RFC5124]        Ott, J. and E. Carrara, "Extended Secure RTP Profile
+                    for Real-time Transport Control Protocol (RTCP)-
+                    Based Feedback (RTP/SAVPF)", RFC 5124,
+                    February 2008.
+
+   [RFC5226]        Narten, T. and H. Alvestrand, "Guidelines for
+                    Writing an IANA Considerations Section in RFCs",
+                    BCP 26, RFC 5226, May 2008.
+
+   [RFC5389]        Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
+                    "Session Traversal Utilities for NAT (STUN)",
+                    RFC 5389, October 2008.
+
+   [RFC5763]        Fischl, J., Tschofenig, H., and E. Rescorla,
+                    "Framework for Establishing a Secure Real-time
+                    Transport Protocol (SRTP) Security Context Using
+                    Datagram Transport Layer Security (DTLS)", RFC 5763,
+                    May 2010.
+
+   [SRTP-NOT-MAND]  Perkins, C. and M. Westerlund, "Why RTP Does Not
+                    Mandate a Single Security Mechanism", Work in
+                    Progress, January 2010.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 22]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+Appendix A.  Overview of DTLS
+
+   This section provides a brief overview of Datagram TLS (DTLS) for
+   those who are not familiar with it.  DTLS is a channel security
+   protocol based on the well-known Transport Layer Security (TLS)
+   [RFC5246] protocol.  Where TLS depends on a reliable transport
+   channel (typically TCP), DTLS has been adapted to support unreliable
+   transports such as UDP.  Otherwise, DTLS is nearly identical to TLS
+   and generally supports the same cryptographic mechanisms.
+
+   Each DTLS association begins with a handshake exchange (shown below)
+   during which the peers authenticate each other and negotiate
+   algorithms, modes, and other parameters and establish shared keying
+   material, as shown below.  In order to support unreliable transport,
+   each side maintains retransmission timers to provide reliable
+   delivery of these messages.  Once the handshake is completed,
+   encrypted data may be sent.
+
+         Client                                               Server
+
+         ClientHello                  -------->
+                                                         ServerHello
+                                                        Certificate*
+                                                  ServerKeyExchange*
+                                                 CertificateRequest*
+                                      <--------      ServerHelloDone
+         Certificate*
+         ClientKeyExchange
+         CertificateVerify*
+         [ChangeCipherSpec]
+         Finished                     -------->
+                                                  [ChangeCipherSpec]
+                                      <--------             Finished
+         Application Data             <------->     Application Data
+
+               '*' indicates messages that are not always sent.
+
+        Figure 5: Basic DTLS Handshake Exchange (after [RFC4347]).
+
+   Application data is protected by being sent as a series of DTLS
+   "records".  These records are independent and can be processed
+   correctly even in the face of loss or reordering.  In DTLS-SRTP, this
+   record protocol is replaced with SRTP [RFC3711]
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 23]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+Appendix B.  Performance of Multiple DTLS Handshakes
+
+   Standard practice for security protocols such as TLS, DTLS, and SSH,
+   which do inline key management, is to create a separate security
+   association for each underlying network channel (TCP connection, UDP
+   host/port quartet, etc.).  This has dual advantages of simplicity and
+   independence of the security contexts for each channel.
+
+   Three concerns have been raised about the overhead of this strategy
+   in the context of RTP security.  The first concern is the additional
+   performance overhead of doing a separate public key operation for
+   each channel.  The conventional procedure here (used in TLS and DTLS)
+   is to establish a master context that can then be used to derive
+   fresh traffic keys for new associations.  In TLS/DTLS, this is called
+   "session resumption" and can be transparently negotiated between the
+   peers.
+
+   The second concern is network bandwidth overhead for the
+   establishment of subsequent connections and for rehandshake (for
+   rekeying) for existing connections.  In particular, there is a
+   concern that the channels will have very narrow capacity requirements
+   allocated entirely to media that will be overflowed by the
+   rehandshake.  Measurements of the size of the rehandshake (with
+   resumption) in TLS indicate that it is about 300-400 bytes if a full
+   selection of cipher suites is offered.  (The size of a full handshake
+   is approximately 1-2 kilobytes larger because of the certificate and
+   keying material exchange.)
+
+   The third concern is the additional round-trips associated with
+   establishing the second, third, ... channels.  In TLS/DTLS, these can
+   all be done in parallel, but in order to take advantage of session
+   resumption they should be done after the first channel is
+   established.  For two channels, this provides a ladder diagram
+   something like this (parenthetical numbers are media channel numbers)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 24]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   Alice                                   Bob
+   -------------------------------------------
+                      <-       ClientHello (1)
+   ServerHello (1)    ->
+   Certificate (1)
+   ServerHelloDone (1)
+                      <- ClientKeyExchange (1)
+                          ChangeCipherSpec (1)
+                                  Finished (1)
+   ChangeCipherSpec (1)->
+   Finished         (1)->
+                                                <--- Channel 1 ready
+
+                      <-       ClientHello (2)
+   ServerHello (2)    ->
+   ChangeCipherSpec(2)->
+   Finished(2)        ->
+                      <-  ChangeCipherSpec (2)
+                                  Finished (2)
+                                                <--- Channel 2 ready
+
+                Figure 6: Parallel DTLS-SRTP negotiations.
+
+   So, there is an additional 1 RTT (round-trip time) after Channel 1 is
+   ready before Channel 2 is ready.  If the peers are potentially
+   willing to forego resumption, they can interlace the handshakes, like
+   so:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 25]
+
+RFC 5764                 SRTP Extension for DTLS                May 2010
+
+
+   Alice                                   Bob
+   -------------------------------------------
+                      <-       ClientHello (1)
+   ServerHello (1)    ->
+   Certificate (1)
+   ServerHelloDone (1)
+                      <- ClientKeyExchange (1)
+                          ChangeCipherSpec (1)
+                                  Finished (1)
+                      <-       ClientHello (2)
+   ChangeCipherSpec (1)->
+   Finished         (1)->
+                                                <--- Channel 1 ready
+   ServerHello (2)    ->
+   ChangeCipherSpec(2)->
+   Finished(2)        ->
+                      <-  ChangeCipherSpec (2)
+                                  Finished (2)
+                                                <--- Channel 2 ready
+
+               Figure 7: Interlaced DTLS-SRTP negotiations.
+
+   In this case, the channels are ready contemporaneously, but if a
+   message in handshake (1) is lost, then handshake (2) requires either
+   a full rehandshake or that Alice be clever and queue the resumption
+   attempt until the first handshake completes.  Note that just dropping
+   the packet works as well, since Bob will retransmit.
+
+Authors' Addresses
+
+   David McGrew
+   Cisco Systems
+   510 McCarthy Blvd.
+   Milpitas, CA  95305
+   USA
+
+   EMail: address@hidden
+
+
+   Eric Rescorla
+   RTFM, Inc.
+   2064 Edgewood Drive
+   Palo Alto, CA  94303
+   USA
+
+   EMail: address@hidden
+
+
+
+
+
+McGrew & Rescorla            Standards Track                   [Page 26]
+
diff --git a/lib/ext/Makefile.am b/lib/ext/Makefile.am
index ca6628e..0d97132 100644
--- a/lib/ext/Makefile.am
+++ b/lib/ext/Makefile.am
@@ -39,5 +39,5 @@ libgnutls_ext_la_SOURCES = max_record.c cert_type.c \
        max_record.h cert_type.h server_name.h srp.h \
        session_ticket.h signature.h safe_renegotiation.h \
        session_ticket.c srp.c ecc.c ecc.h heartbeat.c heartbeat.h \
-       status_request.h status_request.c
+       status_request.h status_request.c srtp.c srtp.h
 
diff --git a/lib/ext/srtp.c b/lib/ext/srtp.c
new file mode 100644
index 0000000..c7b0e86
--- /dev/null
+++ b/lib/ext/srtp.c
@@ -0,0 +1,475 @@
+/*
+ * Copyright (C) 2012 Martin Storsjo
+ * 
+ * Author: Martin Storsjo
+ *
+ * This file is part of GnuTLS.
+ *
+ * The GnuTLS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+#include "gnutls_int.h"
+#include "gnutls_auth.h"
+#include "gnutls_errors.h"
+#include "gnutls_num.h"
+#include <ext/srtp.h>
+
+static int _gnutls_srtp_recv_params (gnutls_session_t session,
+                                     const uint8_t * data,
+                                     size_t data_size);
+static int _gnutls_srtp_send_params (gnutls_session_t session,
+                                     gnutls_buffer_st* extdata);
+
+static int _gnutls_srtp_unpack (gnutls_buffer_st * ps,
+                                extension_priv_data_t * _priv);
+static int _gnutls_srtp_pack (extension_priv_data_t _priv,
+                              gnutls_buffer_st * ps);
+static void _gnutls_srtp_deinit_data (extension_priv_data_t priv);
+
+
+extension_entry_st ext_mod_srtp = {
+  .name = "SRTP",
+  .type = GNUTLS_EXTENSION_SRTP,
+  .parse_type = GNUTLS_EXT_APPLICATION,
+
+  .recv_func = _gnutls_srtp_recv_params,
+  .send_func = _gnutls_srtp_send_params,
+  .pack_func = _gnutls_srtp_pack,
+  .unpack_func = _gnutls_srtp_unpack,
+  .deinit_func = _gnutls_srtp_deinit_data,
+};
+
+typedef struct
+{
+  const char *name;
+  gnutls_srtp_profile_t id;
+} srtp_profile_st;
+
+static const srtp_profile_st profile_names[] = {
+  {
+    "SRTP_AES128_CM_SHA1_80",
+    GNUTLS_SRTP_AES128_CM_SHA1_80,
+  },
+  {
+    "SRTP_AES128_CM_SHA1_32",
+    GNUTLS_SRTP_AES128_CM_SHA1_32,
+  },
+  {
+    "SRTP_NULL_SHA1_80",
+    GNUTLS_SRTP_NULL_SHA1_80,
+  },
+  {
+    "SRTP_NULL_SHA1_32",
+    GNUTLS_SRTP_NULL_SHA1_32,
+  },
+  {
+    NULL,
+    0
+  }
+};
+
+static gnutls_srtp_profile_t find_profile (const char *str, const char *end)
+{
+  const srtp_profile_st *prof = profile_names;
+  unsigned int len;
+  if (end != NULL)
+    {
+      len = end - str;
+    }
+  else
+    {
+      len = strlen (str);
+    }
+
+  while (prof->name != NULL)
+    {
+      if (strlen (prof->name) == len && !strncmp (str, prof->name, len))
+        {
+          return prof->id;
+        }
+      prof++;
+    }
+  return 0;
+}
+
+/**
+ * gnutls_srtp_get_profile_by_name
+ * @name: The name of the profile to look up
+ * @profile: Will hold the profile id
+ *
+ * This function allows you to look up a profile based on a string.
+ *
+ * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned,
+ *   otherwise a negative error code is returned.
+ *
+ * Since 3.1.4
+ **/
+int gnutls_srtp_get_profile_by_name (const char *name,
+                                     gnutls_srtp_profile_t *profile)
+{
+  *profile = find_profile (name, NULL);
+  if (*profile == 0)
+    {
+      return GNUTLS_E_ILLEGAL_PARAMETER;
+    }
+  return 0;
+}
+
+/**
+ * gnutls_srtp_get_profile_name
+ * @profile: The profile to look up a string for
+ *
+ * This function allows you to get the corresponding name for a
+ * SRTP protection profile.
+ *
+ * Returns: On success, the name of a SRTP profile as a string,
+ *   otherwise NULL.
+ *
+ * Since 3.1.4
+ **/
+const char *gnutls_srtp_get_profile_name (gnutls_srtp_profile_t profile)
+{
+  const srtp_profile_st *p = profile_names;
+  while (p->name != NULL)
+    {
+      if (p->id == profile)
+        return p->name;
+      p++;
+    }
+  return NULL;
+}
+
+static int
+_gnutls_srtp_recv_params (gnutls_session_t session,
+                          const uint8_t *data, size_t _data_size)
+{
+  unsigned int i, j;
+  int ret;
+  const uint8_t *p = data;
+  int len;
+  ssize_t data_size = _data_size;
+  srtp_ext_st *priv;
+  extension_priv_data_t epriv;
+  uint16_t profiles[MAX_SRTP_PROFILES];
+  unsigned int profiles_size = 0;
+
+  ret =
+    _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  &epriv);
+  if (ret < 0)
+    return 0;
+
+  priv = epriv.ptr;
+
+  DECR_LENGTH_RET (data_size, 2, 0);
+  len = _gnutls_read_uint16 (p);
+  p += 2;
+
+  while (len > 0)
+    {
+      DECR_LENGTH_RET (data_size, 2, 0);
+      if (profiles_size < MAX_SRTP_PROFILES)
+        profiles_size++;
+      profiles[profiles_size - 1] = _gnutls_read_uint16 (p);
+      p += 2;
+      len -= 2;
+    }
+
+  for (i = 0; i < priv->profiles_size && priv->selected_profile == 0; i++)
+    {
+      for (j = 0; j < profiles_size; j++)
+        {
+          if (priv->profiles[i] == profiles[j])
+            {
+              priv->selected_profile = profiles[j];
+              break;
+            }
+        }
+    }
+
+  return 0;
+}
+
+static int
+_gnutls_srtp_send_params (gnutls_session_t session,
+                          gnutls_buffer_st* extdata)
+{
+  unsigned i;
+  int total_size = 0, ret;
+  srtp_ext_st *priv;
+  extension_priv_data_t epriv;
+
+  ret =
+    _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  &epriv);
+  if (ret < 0)
+    return 0;
+
+  priv = epriv.ptr;
+
+  if (priv->profiles_size == 0)
+    return 0;
+
+  if (session->security_parameters.entity == GNUTLS_SERVER)
+    {
+      /* Don't send anything if no matching profile was found */
+      if (priv->selected_profile == 0)
+        return 0;
+
+      ret = _gnutls_buffer_append_prefix(extdata, 16, 2);
+      if (ret < 0)
+        return gnutls_assert_val(ret);
+      ret = _gnutls_buffer_append_prefix(extdata, 16, priv->selected_profile);
+      if (ret < 0)
+        return gnutls_assert_val(ret);
+      total_size = 4;
+    }
+  else
+    {
+      ret = _gnutls_buffer_append_prefix(extdata, 16, 2 * priv->profiles_size);
+      if (ret < 0)
+        return gnutls_assert_val(ret);
+
+      for (i = 0; i < priv->profiles_size; i++)
+        {
+          ret = _gnutls_buffer_append_prefix(extdata, 16, priv->profiles[i]);
+          if (ret < 0)
+            return gnutls_assert_val(ret);
+        }
+      total_size = 2 + 2 * priv->profiles_size;
+    }
+
+  /* use_mki, not supported yet */
+  ret = _gnutls_buffer_append_prefix(extdata, 8, 0);
+  if (ret < 0)
+    return gnutls_assert_val(ret);
+
+  return total_size + 1;
+}
+
+/**
+ * gnutls_srtp_get_selected_profile:
+ * @session: is a #gnutls_session_t structure.
+ * @profile: will hold the profile
+ *
+ * This function allows you to get the negotiated SRTP profile.
+ *
+ * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned,
+ *   otherwise a negative error code is returned.
+ *
+ * Since 3.1.4
+ **/
+int
+gnutls_srtp_get_selected_profile (gnutls_session_t session,
+                                  gnutls_srtp_profile_t *profile)
+{
+  srtp_ext_st *priv;
+  int ret;
+  extension_priv_data_t epriv;
+
+  ret =
+    _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  &epriv);
+  if (ret < 0)
+    {
+      gnutls_assert ();
+      return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
+    }
+
+  priv = epriv.ptr;
+
+  if (priv->selected_profile == 0)
+    {
+      return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE;
+    }
+
+  *profile = priv->selected_profile;
+
+  return 0;
+}
+
+/**
+ * gnutls_srtp_set_profile:
+ * @session: is a #gnutls_session_t structure.
+ * @profile: is the profile id to add.
+ *
+ * This function is to be used by both clients and servers, to declare
+ * what SRTP profiles they support, to negotiate with the peer.
+ *
+ * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned,
+ *   otherwise a negative error code is returned.
+ *
+ * Since 3.1.4
+ **/
+int
+gnutls_srtp_set_profile (gnutls_session_t session,
+                         gnutls_srtp_profile_t profile)
+{
+  int ret;
+  srtp_ext_st *priv;
+  extension_priv_data_t epriv;
+
+  ret =
+    _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  &epriv);
+  if (ret < 0)
+    {
+      priv = gnutls_calloc (1, sizeof (*priv));
+      if (priv == NULL)
+        {
+          gnutls_assert ();
+          return GNUTLS_E_MEMORY_ERROR;
+        }
+      epriv.ptr = priv;
+      _gnutls_ext_set_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                    epriv);
+    }
+  else
+    priv = epriv.ptr;
+
+  if (priv->profiles_size < MAX_SRTP_PROFILES)
+    priv->profiles_size++;
+  priv->profiles[priv->profiles_size - 1] = profile;
+
+  return 0;
+}
+
+/**
+ * gnutls_srtp_set_profile_direct:
+ * @session: is a #gnutls_session_t structure.
+ * @profiles: is a string that contains the supported SRTP profiles,
+ *   separated by colons.
+ * @err_pos: In case of an error this will have the position in the string the 
error occured, may be NULL.
+ *
+ * This function is to be used by both clients and servers, to declare
+ * what SRTP profiles they support, to negotiate with the peer.
+ *
+ * Returns: On syntax error %GNUTLS_E_INVALID_REQUEST is returned,
+ * %GNUTLS_E_SUCCESS on success, or an error code.
+ *
+ * Since 3.1.4
+ **/
+int
+gnutls_srtp_set_profile_direct (gnutls_session_t session,
+                                const char *profiles, const char **err_pos)
+{
+  int ret;
+  srtp_ext_st *priv;
+  extension_priv_data_t epriv;
+  int set = 0;
+  const char *col;
+  gnutls_srtp_profile_t id;
+
+  ret =
+    _gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  &epriv);
+  if (ret < 0)
+    {
+      set = 1;
+      priv = gnutls_calloc (1, sizeof (*priv));
+      if (priv == NULL)
+        {
+          if (err_pos != NULL)
+            *err_pos = profiles;
+          gnutls_assert ();
+          return GNUTLS_E_MEMORY_ERROR;
+        }
+      epriv.ptr = priv;
+    }
+  else
+    priv = epriv.ptr;
+
+  do
+    {
+      col = strchr (profiles, ':');
+      id = find_profile (profiles, col);
+      if (id == 0)
+        {
+          if (set != 0)
+              gnutls_free (priv);
+          if (err_pos != NULL)
+            *err_pos = profiles;
+          return GNUTLS_E_INVALID_REQUEST;
+        }
+
+      if (priv->profiles_size < MAX_SRTP_PROFILES)
+        {
+          priv->profiles_size++;
+        }
+      priv->profiles[priv->profiles_size - 1] = id;
+      profiles = col + 1;
+    } while (col != NULL);
+
+  if (set != 0)
+    _gnutls_ext_set_session_data (session, GNUTLS_EXTENSION_SRTP,
+                                  epriv);
+
+  return 0;
+}
+
+static void
+_gnutls_srtp_deinit_data (extension_priv_data_t priv)
+{
+  gnutls_free (priv.ptr);
+}
+
+static int
+_gnutls_srtp_pack (extension_priv_data_t epriv, gnutls_buffer_st * ps)
+{
+  srtp_ext_st *priv = epriv.ptr;
+  unsigned int i;
+  int ret;
+
+  BUFFER_APPEND_NUM (ps, priv->profiles_size);
+  for (i = 0; i < priv->profiles_size; i++)
+    {
+      BUFFER_APPEND_NUM (ps, priv->profiles[i]);
+    }
+  BUFFER_APPEND_NUM (ps, priv->selected_profile);
+  return 0;
+}
+
+static int
+_gnutls_srtp_unpack (gnutls_buffer_st * ps,
+                     extension_priv_data_t * _priv)
+{
+  srtp_ext_st *priv;
+  unsigned int i;
+  int ret;
+  extension_priv_data_t epriv;
+
+  priv = gnutls_calloc (1, sizeof (*priv));
+  if (priv == NULL)
+    {
+      gnutls_assert ();
+      return GNUTLS_E_MEMORY_ERROR;
+    }
+
+  BUFFER_POP_NUM (ps, priv->profiles_size);
+  for (i = 0; i < priv->profiles_size; i++)
+    {
+      BUFFER_POP_NUM (ps, priv->profiles[i]);
+    }
+  BUFFER_POP_NUM (ps, priv->selected_profile);
+
+  epriv.ptr = priv;
+  *_priv = epriv;
+
+  return 0;
+
+error:
+  gnutls_free (priv);
+  return ret;
+}
diff --git a/lib/ext/cert_type.h b/lib/ext/srtp.h
similarity index 70%
copy from lib/ext/cert_type.h
copy to lib/ext/srtp.h
index f6f1ea7..42a097e 100644
--- a/lib/ext/cert_type.h
+++ b/lib/ext/srtp.h
@@ -1,7 +1,7 @@
 /*
- * Copyright (C) 2002-2012 Free Software Foundation, Inc.
+ * Copyright (C) 2012 Martin Storsjo
  *
- * Author: Nikos Mavrogiannopoulos
+ * Author: Martin Storsjo
  *
  * This file is part of GnuTLS.
  *
@@ -19,12 +19,20 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>
  *
  */
-
-#ifndef EXT_CERT_TYPE_H
-#define EXT_CERT_TYPE_H
+#ifndef EXT_SRTP_H
+#define EXT_SRTP_H
 
 #include <gnutls_extensions.h>
 
-extern extension_entry_st ext_mod_cert_type;
+#define MAX_SRTP_PROFILES 4
+
+typedef struct
+{
+  gnutls_srtp_profile_t profiles[MAX_SRTP_PROFILES];
+  unsigned profiles_size;
+  gnutls_srtp_profile_t selected_profile;
+} srtp_ext_st;
+
+extern extension_entry_st ext_mod_srtp;
 
 #endif
diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c
index 5bb20f1..90bcc6b 100644
--- a/lib/gnutls_cert.c
+++ b/lib/gnutls_cert.c
@@ -645,8 +645,8 @@ _gnutls_openpgp_crt_verify_peers (gnutls_session_t session,
  * This function will verify the peer's certificate and return
  * its status (trusted, invalid etc.).  The value of @status will
  * be one or more of the gnutls_certificate_status_t flags
- * bitwise or'd. Note that verification failure does not imply a
- * negative return value. Only the @status is updated.
+ * bitwise or'd or zero if the certificate is trusted. Note that verification 
+ * does not imply a negative return value. Only the @status is updated.
  *
  * If available the OCSP Certificate Status extension will be
  * utilized by this function.
@@ -699,8 +699,8 @@ gnutls_certificate_verify_peers2 (gnutls_session_t session,
  * This function will verify the peer's certificate and its name and 
  * return its status (trusted, invalid etc.).  The value of @status will
  * be one or more of the gnutls_certificate_status_t flags
- * bitwise or'd. Note that verification failure does not imply a
- * negative return value. Only the @status is updated.
+ * bitwise or'd or zero if the certificate is trusted. Note that verification 
+ * failure does not imply a negative return value. Only the @status is updated.
  *
  * In case the @hostname does not match the %GNUTLS_CERT_UNEXPECTED_OWNER
  * status flag will be set.
@@ -713,6 +713,8 @@ gnutls_certificate_verify_peers2 (gnutls_session_t session,
  * size are set. To override them use gnutls_certificate_set_verify_limits().
  *
  * Returns: a negative error code on error and %GNUTLS_E_SUCCESS (0) on 
success.
+ *
+ * Since: 3.1.4
  **/
 int
 gnutls_certificate_verify_peers3 (gnutls_session_t session,
@@ -919,6 +921,8 @@ _gnutls_check_key_cert_match 
(gnutls_certificate_credentials_t res)
  *
  * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a
  *   negative error value.
+ *
+ * Since: 3.1.4
  **/
 int
 gnutls_certificate_verification_status_print (unsigned int status,
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c
index aab0a67..28a852b 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/gnutls_extensions.c
@@ -39,6 +39,7 @@
 #include <ext/safe_renegotiation.h>
 #include <ext/ecc.h>
 #include <ext/status_request.h>
+#include <ext/srtp.h>
 #include <gnutls_num.h>
 
 
@@ -354,6 +355,10 @@ _gnutls_ext_init (void)
   if (ret != GNUTLS_E_SUCCESS)
     return ret;
 
+  ret = _gnutls_ext_register (&ext_mod_srtp);
+  if (ret != GNUTLS_E_SUCCESS)
+    return ret;
+
   return GNUTLS_E_SUCCESS;
 }
 
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 1f103cb..68a176e 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -261,6 +261,7 @@ typedef enum extensions_t
   GNUTLS_EXTENSION_SUPPORTED_ECC_PF = 11,
   GNUTLS_EXTENSION_SRP = 12,
   GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS = 13,
+  GNUTLS_EXTENSION_SRTP = 14,
   GNUTLS_EXTENSION_HEARTBEAT = 15,
   GNUTLS_EXTENSION_SESSION_TICKET = 35,
   GNUTLS_EXTENSION_SAFE_RENEGOTIATION = 65281   /* aka: 0xff01 */
diff --git a/lib/gnutls_session.c b/lib/gnutls_session.c
index eea332c..2f7bfd1 100644
--- a/lib/gnutls_session.c
+++ b/lib/gnutls_session.c
@@ -169,6 +169,8 @@ gnutls_session_get_id (gnutls_session_t session,
  *
  * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise
  *   an error code is returned.
+ *
+ * Since: 3.1.4
  **/
 int
 gnutls_session_get_id2 (gnutls_session_t session,
diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c
index 8b157e7..71888d4 100644
--- a/lib/gnutls_ui.c
+++ b/lib/gnutls_ui.c
@@ -706,6 +706,7 @@ gnutls_certificate_set_verify_flags 
(gnutls_certificate_credentials_t
  * #gnutls_certificate_verify_flags enumerations. The default
  * for TLS sessions is GNUTLS_VERIFY_ALLOW_UNSORTED_CHAIN.
  *
+ * Since: 3.1.4
  **/
 void
 gnutls_certificate_update_verify_flags (gnutls_certificate_credentials_t
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index ff0994a..3a80fc9 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -963,6 +963,36 @@ gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t 
session);
   int gnutls_session_ticket_enable_server (gnutls_session_t session,
                                            const gnutls_datum_t * key);
 
+  /* SRTP, RFC 5764 */
+
+/**
+ * gnutls_srtp_profile_t:
+ * @GNUTLS_SRTP_AES128_CM_SHA1_80: 128 bit AES with a 80 bit HMAC-SHA1
+ * @GNUTLS_SRTP_AES128_CM_SHA1_32: 128 bit AES with a 32 bit HMAC-SHA1
+ * @GNUTLS_SRTP_NULL_SHA1_80: NULL cipher with a 80 bit HMAC-SHA1
+ * @GNUTLS_SRTP_NULL_SHA1_32: NULL cipher with a 32 bit HMAC-SHA1
+ *
+ * Enumeration of different SRTP protection profiles.
+ */
+  typedef enum
+  {
+    GNUTLS_SRTP_AES128_CM_SHA1_80 = 0x0001,
+    GNUTLS_SRTP_AES128_CM_SHA1_32 = 0x0002,
+    GNUTLS_SRTP_NULL_SHA1_80      = 0x0005,
+    GNUTLS_SRTP_NULL_SHA1_32      = 0x0006
+  } gnutls_srtp_profile_t;
+
+  int gnutls_srtp_set_profile (gnutls_session_t session,
+                               gnutls_srtp_profile_t profile);
+  int gnutls_srtp_set_profile_direct (gnutls_session_t session,
+                                      const char *profiles, const char 
**err_pos);
+  int gnutls_srtp_get_selected_profile (gnutls_session_t session,
+                                        gnutls_srtp_profile_t *profile);
+
+  const char *gnutls_srtp_get_profile_name (gnutls_srtp_profile_t profile);
+  int gnutls_srtp_get_profile_by_name (const char *name,
+                                       gnutls_srtp_profile_t *profile);
+
   int gnutls_key_generate (gnutls_datum_t * key, unsigned int key_size);
 
 /* if you just want some defaults, use the following.
diff --git a/lib/libgnutls.map b/lib/libgnutls.map
index e20597c..b1f5b91 100644
--- a/lib/libgnutls.map
+++ b/lib/libgnutls.map
@@ -354,6 +354,11 @@ GNUTLS_1_4
     gnutls_srp_set_server_credentials_file;
     gnutls_srp_set_server_credentials_function;
     gnutls_srp_verifier;
+    gnutls_srtp_get_profile_by_name;
+    gnutls_srtp_get_profile_name;
+    gnutls_srtp_get_selected_profile;
+    gnutls_srtp_set_profile;
+    gnutls_srtp_set_profile_direct;
     gnutls_strdup;
     gnutls_strerror;
     gnutls_strerror_name;
diff --git a/src/cli-args.c b/src/cli-args.c
index c21f254..d02345d 100644
--- a/src/cli-args.c
+++ b/src/cli-args.c
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (cli-args.c)
  *  
- *  It has been AutoGen-ed  October 13, 2012 at 08:48:21 PM by AutoGen 5.16
+ *  It has been AutoGen-ed  November  1, 2012 at 03:36:16 PM by AutoGen 5.16
  *  From the definitions    cli-args.def
  *  and the template file   options
  *
@@ -67,7 +67,7 @@ extern FILE * option_usage_fp;
 /*
  *  gnutls-cli option static const strings
  */
-static char const gnutls_cli_opt_strs[3808] =
+static char const gnutls_cli_opt_strs[3856] =
 /*     0 */ "gnutls-cli @address@hidden"
             "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
@@ -130,104 +130,107 @@ static char const gnutls_cli_opt_strs[3808] =
 /*  1641 */ "Set MTU for datagram TLS\0"
 /*  1666 */ "MTU\0"
 /*  1670 */ "mtu\0"
-/*  1674 */ "Send CR LF instead of LF\0"
-/*  1699 */ "CRLF\0"
-/*  1704 */ "crlf\0"
-/*  1709 */ "Use DER format for certificates to read from\0"
-/*  1754 */ "X509FMTDER\0"
-/*  1765 */ "x509fmtder\0"
-/*  1776 */ "Send the openpgp fingerprint, instead of the key\0"
-/*  1825 */ "FINGERPRINT\0"
-/*  1837 */ "fingerprint\0"
-/*  1849 */ "Disable all the TLS extensions\0"
-/*  1880 */ "DISABLE_EXTENSIONS\0"
-/*  1899 */ "disable-extensions\0"
-/*  1918 */ "Print peer's certificate in PEM format\0"
-/*  1957 */ "PRINT_CERT\0"
-/*  1968 */ "print-cert\0"
-/*  1979 */ "The maximum record size to advertize\0"
-/*  2016 */ "RECORDSIZE\0"
-/*  2027 */ "recordsize\0"
-/*  2038 */ "The minimum number of bits allowed for DH\0"
-/*  2080 */ "DH_BITS\0"
-/*  2088 */ "dh-bits\0"
-/*  2096 */ "Priorities string\0"
-/*  2114 */ "PRIORITY\0"
-/*  2123 */ "priority\0"
-/*  2132 */ "Certificate file or PKCS #11 URL to use\0"
-/*  2172 */ "X509CAFILE\0"
-/*  2183 */ "x509cafile\0"
-/*  2194 */ "CRL file to use\0"
-/*  2210 */ "X509CRLFILE\0"
-/*  2222 */ "x509crlfile\0"
-/*  2234 */ "PGP Key file to use\0"
-/*  2254 */ "PGPKEYFILE\0"
-/*  2265 */ "pgpkeyfile\0"
-/*  2276 */ "PGP Key ring file to use\0"
-/*  2301 */ "PGPKEYRING\0"
-/*  2312 */ "pgpkeyring\0"
-/*  2323 */ "PGP Public Key (certificate) file to use\0"
-/*  2364 */ "PGPCERTFILE\0"
-/*  2376 */ "pgpcertfile\0"
-/*  2388 */ "X.509 key file or PKCS #11 URL to use\0"
-/*  2426 */ "X509KEYFILE\0"
-/*  2438 */ "x509keyfile\0"
-/*  2450 */ "X.509 Certificate file or PKCS #11 URL to use\0"
-/*  2496 */ "X509CERTFILE\0"
-/*  2509 */ "x509certfile\0"
-/*  2522 */ "PGP subkey to use (hex or auto)\0"
-/*  2554 */ "PGPSUBKEY\0"
-/*  2564 */ "pgpsubkey\0"
-/*  2574 */ "SRP username to use\0"
-/*  2594 */ "SRPUSERNAME\0"
-/*  2606 */ "srpusername\0"
-/*  2618 */ "SRP password to use\0"
-/*  2638 */ "SRPPASSWD\0"
-/*  2648 */ "srppasswd\0"
-/*  2658 */ "PSK username to use\0"
-/*  2678 */ "PSKUSERNAME\0"
-/*  2690 */ "pskusername\0"
-/*  2702 */ "PSK key (in hex) to use\0"
-/*  2726 */ "PSKKEY\0"
-/*  2733 */ "pskkey\0"
-/*  2740 */ "The port or service to connect to\0"
-/*  2774 */ "PORT\0"
-/*  2779 */ "port\0"
-/*  2784 */ "Don't abort program if server certificate can't be validated\0"
-/*  2845 */ "INSECURE\0"
-/*  2854 */ "insecure\0"
-/*  2863 */ "Benchmark individual ciphers\0"
-/*  2892 */ "BENCHMARK_CIPHERS\0"
-/*  2910 */ "benchmark-ciphers\0"
-/*  2928 */ "Benchmark individual software ciphers (no hw acceleration)\0"
-/*  2987 */ "BENCHMARK_SOFT_CIPHERS\0"
-/*  3010 */ "benchmark-soft-ciphers\0"
-/*  3033 */ "Benchmark TLS key exchange methods\0"
-/*  3068 */ "BENCHMARK_TLS_KX\0"
-/*  3085 */ "benchmark-tls-kx\0"
-/*  3102 */ "Benchmark TLS ciphers\0"
-/*  3124 */ "BENCHMARK_TLS_CIPHERS\0"
-/*  3146 */ "benchmark-tls-ciphers\0"
-/*  3168 */ "Print a list of the supported algorithms and modes\0"
-/*  3219 */ "LIST\0"
-/*  3224 */ "list\0"
-/*  3229 */ "Display extended usage information and exit\0"
-/*  3273 */ "help\0"
-/*  3278 */ "Extended usage information passed thru pager\0"
-/*  3323 */ "more-help\0"
-/*  3333 */ "Output version information and exit\0"
-/*  3369 */ "version\0"
-/*  3377 */ "GNUTLS_CLI\0"
-/*  3388 */ "gnutls-cli - GnuTLS client - Ver. @address@hidden"
+/*  1674 */ "Offer SRTP profiles\0"
+/*  1694 */ "SRTP_PROFILES\0"
+/*  1708 */ "srtp-profiles\0"
+/*  1722 */ "Send CR LF instead of LF\0"
+/*  1747 */ "CRLF\0"
+/*  1752 */ "crlf\0"
+/*  1757 */ "Use DER format for certificates to read from\0"
+/*  1802 */ "X509FMTDER\0"
+/*  1813 */ "x509fmtder\0"
+/*  1824 */ "Send the openpgp fingerprint, instead of the key\0"
+/*  1873 */ "FINGERPRINT\0"
+/*  1885 */ "fingerprint\0"
+/*  1897 */ "Disable all the TLS extensions\0"
+/*  1928 */ "DISABLE_EXTENSIONS\0"
+/*  1947 */ "disable-extensions\0"
+/*  1966 */ "Print peer's certificate in PEM format\0"
+/*  2005 */ "PRINT_CERT\0"
+/*  2016 */ "print-cert\0"
+/*  2027 */ "The maximum record size to advertize\0"
+/*  2064 */ "RECORDSIZE\0"
+/*  2075 */ "recordsize\0"
+/*  2086 */ "The minimum number of bits allowed for DH\0"
+/*  2128 */ "DH_BITS\0"
+/*  2136 */ "dh-bits\0"
+/*  2144 */ "Priorities string\0"
+/*  2162 */ "PRIORITY\0"
+/*  2171 */ "priority\0"
+/*  2180 */ "Certificate file or PKCS #11 URL to use\0"
+/*  2220 */ "X509CAFILE\0"
+/*  2231 */ "x509cafile\0"
+/*  2242 */ "CRL file to use\0"
+/*  2258 */ "X509CRLFILE\0"
+/*  2270 */ "x509crlfile\0"
+/*  2282 */ "PGP Key file to use\0"
+/*  2302 */ "PGPKEYFILE\0"
+/*  2313 */ "pgpkeyfile\0"
+/*  2324 */ "PGP Key ring file to use\0"
+/*  2349 */ "PGPKEYRING\0"
+/*  2360 */ "pgpkeyring\0"
+/*  2371 */ "PGP Public Key (certificate) file to use\0"
+/*  2412 */ "PGPCERTFILE\0"
+/*  2424 */ "pgpcertfile\0"
+/*  2436 */ "X.509 key file or PKCS #11 URL to use\0"
+/*  2474 */ "X509KEYFILE\0"
+/*  2486 */ "x509keyfile\0"
+/*  2498 */ "X.509 Certificate file or PKCS #11 URL to use\0"
+/*  2544 */ "X509CERTFILE\0"
+/*  2557 */ "x509certfile\0"
+/*  2570 */ "PGP subkey to use (hex or auto)\0"
+/*  2602 */ "PGPSUBKEY\0"
+/*  2612 */ "pgpsubkey\0"
+/*  2622 */ "SRP username to use\0"
+/*  2642 */ "SRPUSERNAME\0"
+/*  2654 */ "srpusername\0"
+/*  2666 */ "SRP password to use\0"
+/*  2686 */ "SRPPASSWD\0"
+/*  2696 */ "srppasswd\0"
+/*  2706 */ "PSK username to use\0"
+/*  2726 */ "PSKUSERNAME\0"
+/*  2738 */ "pskusername\0"
+/*  2750 */ "PSK key (in hex) to use\0"
+/*  2774 */ "PSKKEY\0"
+/*  2781 */ "pskkey\0"
+/*  2788 */ "The port or service to connect to\0"
+/*  2822 */ "PORT\0"
+/*  2827 */ "port\0"
+/*  2832 */ "Don't abort program if server certificate can't be validated\0"
+/*  2893 */ "INSECURE\0"
+/*  2902 */ "insecure\0"
+/*  2911 */ "Benchmark individual ciphers\0"
+/*  2940 */ "BENCHMARK_CIPHERS\0"
+/*  2958 */ "benchmark-ciphers\0"
+/*  2976 */ "Benchmark individual software ciphers (no hw acceleration)\0"
+/*  3035 */ "BENCHMARK_SOFT_CIPHERS\0"
+/*  3058 */ "benchmark-soft-ciphers\0"
+/*  3081 */ "Benchmark TLS key exchange methods\0"
+/*  3116 */ "BENCHMARK_TLS_KX\0"
+/*  3133 */ "benchmark-tls-kx\0"
+/*  3150 */ "Benchmark TLS ciphers\0"
+/*  3172 */ "BENCHMARK_TLS_CIPHERS\0"
+/*  3194 */ "benchmark-tls-ciphers\0"
+/*  3216 */ "Print a list of the supported algorithms and modes\0"
+/*  3267 */ "LIST\0"
+/*  3272 */ "list\0"
+/*  3277 */ "Display extended usage information and exit\0"
+/*  3321 */ "help\0"
+/*  3326 */ "Extended usage information passed thru pager\0"
+/*  3371 */ "more-help\0"
+/*  3381 */ "Output version information and exit\0"
+/*  3417 */ "version\0"
+/*  3425 */ "GNUTLS_CLI\0"
+/*  3436 */ "gnutls-cli - GnuTLS client - Ver. @address@hidden"
             "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... 
[hostname]\n\0"
-/*  3501 */ "address@hidden"
-/*  3520 */ "\n\n\0"
-/*  3523 */ "\n"
+/*  3549 */ "address@hidden"
+/*  3568 */ "\n\n\0"
+/*  3571 */ "\n"
             "Simple client program to set up a TLS connection to some other 
computer.  It\n"
             "sets up a TLS connection and forwards data from the standard 
input to the\n"
             "secured socket and vice versa.\n\0"
-/*  3707 */ "gnutls-cli @address@hidden"
-/*  3728 */ "Usage: gnutls-cli [options] hostname\n"
+/*  3755 */ "gnutls-cli @address@hidden"
+/*  3776 */ "Usage: gnutls-cli [options] hostname\n"
             "gnutls-cli --help for usage instructions.\n";
 
 /*
@@ -365,245 +368,254 @@ static char const gnutls_cli_opt_strs[3808] =
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
+ *  srtp_profiles option description:
+ */
+#define SRTP_PROFILES_DESC      (gnutls_cli_opt_strs+1674)
+#define SRTP_PROFILES_NAME      (gnutls_cli_opt_strs+1694)
+#define SRTP_PROFILES_name      (gnutls_cli_opt_strs+1708)
+#define SRTP_PROFILES_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
  *  crlf option description:
  */
-#define CRLF_DESC      (gnutls_cli_opt_strs+1674)
-#define CRLF_NAME      (gnutls_cli_opt_strs+1699)
-#define CRLF_name      (gnutls_cli_opt_strs+1704)
+#define CRLF_DESC      (gnutls_cli_opt_strs+1722)
+#define CRLF_NAME      (gnutls_cli_opt_strs+1747)
+#define CRLF_name      (gnutls_cli_opt_strs+1752)
 #define CRLF_FLAGS     (OPTST_DISABLED)
 
 /*
  *  x509fmtder option description:
  */
-#define X509FMTDER_DESC      (gnutls_cli_opt_strs+1709)
-#define X509FMTDER_NAME      (gnutls_cli_opt_strs+1754)
-#define X509FMTDER_name      (gnutls_cli_opt_strs+1765)
+#define X509FMTDER_DESC      (gnutls_cli_opt_strs+1757)
+#define X509FMTDER_NAME      (gnutls_cli_opt_strs+1802)
+#define X509FMTDER_name      (gnutls_cli_opt_strs+1813)
 #define X509FMTDER_FLAGS     (OPTST_DISABLED)
 
 /*
  *  fingerprint option description:
  */
-#define FINGERPRINT_DESC      (gnutls_cli_opt_strs+1776)
-#define FINGERPRINT_NAME      (gnutls_cli_opt_strs+1825)
-#define FINGERPRINT_name      (gnutls_cli_opt_strs+1837)
+#define FINGERPRINT_DESC      (gnutls_cli_opt_strs+1824)
+#define FINGERPRINT_NAME      (gnutls_cli_opt_strs+1873)
+#define FINGERPRINT_name      (gnutls_cli_opt_strs+1885)
 #define FINGERPRINT_FLAGS     (OPTST_DISABLED)
 
 /*
  *  disable-extensions option description:
  */
-#define DISABLE_EXTENSIONS_DESC      (gnutls_cli_opt_strs+1849)
-#define DISABLE_EXTENSIONS_NAME      (gnutls_cli_opt_strs+1880)
-#define DISABLE_EXTENSIONS_name      (gnutls_cli_opt_strs+1899)
+#define DISABLE_EXTENSIONS_DESC      (gnutls_cli_opt_strs+1897)
+#define DISABLE_EXTENSIONS_NAME      (gnutls_cli_opt_strs+1928)
+#define DISABLE_EXTENSIONS_name      (gnutls_cli_opt_strs+1947)
 #define DISABLE_EXTENSIONS_FLAGS     (OPTST_DISABLED)
 
 /*
  *  print-cert option description:
  */
-#define PRINT_CERT_DESC      (gnutls_cli_opt_strs+1918)
-#define PRINT_CERT_NAME      (gnutls_cli_opt_strs+1957)
-#define PRINT_CERT_name      (gnutls_cli_opt_strs+1968)
+#define PRINT_CERT_DESC      (gnutls_cli_opt_strs+1966)
+#define PRINT_CERT_NAME      (gnutls_cli_opt_strs+2005)
+#define PRINT_CERT_name      (gnutls_cli_opt_strs+2016)
 #define PRINT_CERT_FLAGS     (OPTST_DISABLED)
 
 /*
  *  recordsize option description:
  */
-#define RECORDSIZE_DESC      (gnutls_cli_opt_strs+1979)
-#define RECORDSIZE_NAME      (gnutls_cli_opt_strs+2016)
-#define RECORDSIZE_name      (gnutls_cli_opt_strs+2027)
+#define RECORDSIZE_DESC      (gnutls_cli_opt_strs+2027)
+#define RECORDSIZE_NAME      (gnutls_cli_opt_strs+2064)
+#define RECORDSIZE_name      (gnutls_cli_opt_strs+2075)
 #define RECORDSIZE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  dh-bits option description:
  */
-#define DH_BITS_DESC      (gnutls_cli_opt_strs+2038)
-#define DH_BITS_NAME      (gnutls_cli_opt_strs+2080)
-#define DH_BITS_name      (gnutls_cli_opt_strs+2088)
+#define DH_BITS_DESC      (gnutls_cli_opt_strs+2086)
+#define DH_BITS_NAME      (gnutls_cli_opt_strs+2128)
+#define DH_BITS_name      (gnutls_cli_opt_strs+2136)
 #define DH_BITS_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  priority option description:
  */
-#define PRIORITY_DESC      (gnutls_cli_opt_strs+2096)
-#define PRIORITY_NAME      (gnutls_cli_opt_strs+2114)
-#define PRIORITY_name      (gnutls_cli_opt_strs+2123)
+#define PRIORITY_DESC      (gnutls_cli_opt_strs+2144)
+#define PRIORITY_NAME      (gnutls_cli_opt_strs+2162)
+#define PRIORITY_name      (gnutls_cli_opt_strs+2171)
 #define PRIORITY_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509cafile option description:
  */
-#define X509CAFILE_DESC      (gnutls_cli_opt_strs+2132)
-#define X509CAFILE_NAME      (gnutls_cli_opt_strs+2172)
-#define X509CAFILE_name      (gnutls_cli_opt_strs+2183)
+#define X509CAFILE_DESC      (gnutls_cli_opt_strs+2180)
+#define X509CAFILE_NAME      (gnutls_cli_opt_strs+2220)
+#define X509CAFILE_name      (gnutls_cli_opt_strs+2231)
 #define X509CAFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509crlfile option description:
  */
-#define X509CRLFILE_DESC      (gnutls_cli_opt_strs+2194)
-#define X509CRLFILE_NAME      (gnutls_cli_opt_strs+2210)
-#define X509CRLFILE_name      (gnutls_cli_opt_strs+2222)
+#define X509CRLFILE_DESC      (gnutls_cli_opt_strs+2242)
+#define X509CRLFILE_NAME      (gnutls_cli_opt_strs+2258)
+#define X509CRLFILE_name      (gnutls_cli_opt_strs+2270)
 #define X509CRLFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpkeyfile option description:
  */
-#define PGPKEYFILE_DESC      (gnutls_cli_opt_strs+2234)
-#define PGPKEYFILE_NAME      (gnutls_cli_opt_strs+2254)
-#define PGPKEYFILE_name      (gnutls_cli_opt_strs+2265)
+#define PGPKEYFILE_DESC      (gnutls_cli_opt_strs+2282)
+#define PGPKEYFILE_NAME      (gnutls_cli_opt_strs+2302)
+#define PGPKEYFILE_name      (gnutls_cli_opt_strs+2313)
 #define PGPKEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpkeyring option description:
  */
-#define PGPKEYRING_DESC      (gnutls_cli_opt_strs+2276)
-#define PGPKEYRING_NAME      (gnutls_cli_opt_strs+2301)
-#define PGPKEYRING_name      (gnutls_cli_opt_strs+2312)
+#define PGPKEYRING_DESC      (gnutls_cli_opt_strs+2324)
+#define PGPKEYRING_NAME      (gnutls_cli_opt_strs+2349)
+#define PGPKEYRING_name      (gnutls_cli_opt_strs+2360)
 #define PGPKEYRING_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpcertfile option description:
  */
-#define PGPCERTFILE_DESC      (gnutls_cli_opt_strs+2323)
-#define PGPCERTFILE_NAME      (gnutls_cli_opt_strs+2364)
-#define PGPCERTFILE_name      (gnutls_cli_opt_strs+2376)
+#define PGPCERTFILE_DESC      (gnutls_cli_opt_strs+2371)
+#define PGPCERTFILE_NAME      (gnutls_cli_opt_strs+2412)
+#define PGPCERTFILE_name      (gnutls_cli_opt_strs+2424)
 #define PGPCERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  x509keyfile option description:
  */
-#define X509KEYFILE_DESC      (gnutls_cli_opt_strs+2388)
-#define X509KEYFILE_NAME      (gnutls_cli_opt_strs+2426)
-#define X509KEYFILE_name      (gnutls_cli_opt_strs+2438)
+#define X509KEYFILE_DESC      (gnutls_cli_opt_strs+2436)
+#define X509KEYFILE_NAME      (gnutls_cli_opt_strs+2474)
+#define X509KEYFILE_name      (gnutls_cli_opt_strs+2486)
 #define X509KEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509certfile option description:
  */
-#define X509CERTFILE_DESC      (gnutls_cli_opt_strs+2450)
-#define X509CERTFILE_NAME      (gnutls_cli_opt_strs+2496)
-#define X509CERTFILE_name      (gnutls_cli_opt_strs+2509)
+#define X509CERTFILE_DESC      (gnutls_cli_opt_strs+2498)
+#define X509CERTFILE_NAME      (gnutls_cli_opt_strs+2544)
+#define X509CERTFILE_name      (gnutls_cli_opt_strs+2557)
 #define X509CERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  pgpsubkey option description:
  */
-#define PGPSUBKEY_DESC      (gnutls_cli_opt_strs+2522)
-#define PGPSUBKEY_NAME      (gnutls_cli_opt_strs+2554)
-#define PGPSUBKEY_name      (gnutls_cli_opt_strs+2564)
+#define PGPSUBKEY_DESC      (gnutls_cli_opt_strs+2570)
+#define PGPSUBKEY_NAME      (gnutls_cli_opt_strs+2602)
+#define PGPSUBKEY_name      (gnutls_cli_opt_strs+2612)
 #define PGPSUBKEY_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  srpusername option description:
  */
-#define SRPUSERNAME_DESC      (gnutls_cli_opt_strs+2574)
-#define SRPUSERNAME_NAME      (gnutls_cli_opt_strs+2594)
-#define SRPUSERNAME_name      (gnutls_cli_opt_strs+2606)
+#define SRPUSERNAME_DESC      (gnutls_cli_opt_strs+2622)
+#define SRPUSERNAME_NAME      (gnutls_cli_opt_strs+2642)
+#define SRPUSERNAME_name      (gnutls_cli_opt_strs+2654)
 #define SRPUSERNAME_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  srppasswd option description:
  */
-#define SRPPASSWD_DESC      (gnutls_cli_opt_strs+2618)
-#define SRPPASSWD_NAME      (gnutls_cli_opt_strs+2638)
-#define SRPPASSWD_name      (gnutls_cli_opt_strs+2648)
+#define SRPPASSWD_DESC      (gnutls_cli_opt_strs+2666)
+#define SRPPASSWD_NAME      (gnutls_cli_opt_strs+2686)
+#define SRPPASSWD_name      (gnutls_cli_opt_strs+2696)
 #define SRPPASSWD_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  pskusername option description:
  */
-#define PSKUSERNAME_DESC      (gnutls_cli_opt_strs+2658)
-#define PSKUSERNAME_NAME      (gnutls_cli_opt_strs+2678)
-#define PSKUSERNAME_name      (gnutls_cli_opt_strs+2690)
+#define PSKUSERNAME_DESC      (gnutls_cli_opt_strs+2706)
+#define PSKUSERNAME_NAME      (gnutls_cli_opt_strs+2726)
+#define PSKUSERNAME_name      (gnutls_cli_opt_strs+2738)
 #define PSKUSERNAME_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  pskkey option description:
  */
-#define PSKKEY_DESC      (gnutls_cli_opt_strs+2702)
-#define PSKKEY_NAME      (gnutls_cli_opt_strs+2726)
-#define PSKKEY_name      (gnutls_cli_opt_strs+2733)
+#define PSKKEY_DESC      (gnutls_cli_opt_strs+2750)
+#define PSKKEY_NAME      (gnutls_cli_opt_strs+2774)
+#define PSKKEY_name      (gnutls_cli_opt_strs+2781)
 #define PSKKEY_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  port option description:
  */
-#define PORT_DESC      (gnutls_cli_opt_strs+2740)
-#define PORT_NAME      (gnutls_cli_opt_strs+2774)
-#define PORT_name      (gnutls_cli_opt_strs+2779)
+#define PORT_DESC      (gnutls_cli_opt_strs+2788)
+#define PORT_NAME      (gnutls_cli_opt_strs+2822)
+#define PORT_name      (gnutls_cli_opt_strs+2827)
 #define PORT_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  insecure option description:
  */
-#define INSECURE_DESC      (gnutls_cli_opt_strs+2784)
-#define INSECURE_NAME      (gnutls_cli_opt_strs+2845)
-#define INSECURE_name      (gnutls_cli_opt_strs+2854)
+#define INSECURE_DESC      (gnutls_cli_opt_strs+2832)
+#define INSECURE_NAME      (gnutls_cli_opt_strs+2893)
+#define INSECURE_name      (gnutls_cli_opt_strs+2902)
 #define INSECURE_FLAGS     (OPTST_DISABLED)
 
 /*
  *  benchmark-ciphers option description:
  */
-#define BENCHMARK_CIPHERS_DESC      (gnutls_cli_opt_strs+2863)
-#define BENCHMARK_CIPHERS_NAME      (gnutls_cli_opt_strs+2892)
-#define BENCHMARK_CIPHERS_name      (gnutls_cli_opt_strs+2910)
+#define BENCHMARK_CIPHERS_DESC      (gnutls_cli_opt_strs+2911)
+#define BENCHMARK_CIPHERS_NAME      (gnutls_cli_opt_strs+2940)
+#define BENCHMARK_CIPHERS_name      (gnutls_cli_opt_strs+2958)
 #define BENCHMARK_CIPHERS_FLAGS     (OPTST_DISABLED)
 
 /*
  *  benchmark-soft-ciphers option description:
  */
-#define BENCHMARK_SOFT_CIPHERS_DESC      (gnutls_cli_opt_strs+2928)
-#define BENCHMARK_SOFT_CIPHERS_NAME      (gnutls_cli_opt_strs+2987)
-#define BENCHMARK_SOFT_CIPHERS_name      (gnutls_cli_opt_strs+3010)
+#define BENCHMARK_SOFT_CIPHERS_DESC      (gnutls_cli_opt_strs+2976)
+#define BENCHMARK_SOFT_CIPHERS_NAME      (gnutls_cli_opt_strs+3035)
+#define BENCHMARK_SOFT_CIPHERS_name      (gnutls_cli_opt_strs+3058)
 #define BENCHMARK_SOFT_CIPHERS_FLAGS     (OPTST_DISABLED)
 
 /*
  *  benchmark-tls-kx option description:
  */
-#define BENCHMARK_TLS_KX_DESC      (gnutls_cli_opt_strs+3033)
-#define BENCHMARK_TLS_KX_NAME      (gnutls_cli_opt_strs+3068)
-#define BENCHMARK_TLS_KX_name      (gnutls_cli_opt_strs+3085)
+#define BENCHMARK_TLS_KX_DESC      (gnutls_cli_opt_strs+3081)
+#define BENCHMARK_TLS_KX_NAME      (gnutls_cli_opt_strs+3116)
+#define BENCHMARK_TLS_KX_name      (gnutls_cli_opt_strs+3133)
 #define BENCHMARK_TLS_KX_FLAGS     (OPTST_DISABLED)
 
 /*
  *  benchmark-tls-ciphers option description:
  */
-#define BENCHMARK_TLS_CIPHERS_DESC      (gnutls_cli_opt_strs+3102)
-#define BENCHMARK_TLS_CIPHERS_NAME      (gnutls_cli_opt_strs+3124)
-#define BENCHMARK_TLS_CIPHERS_name      (gnutls_cli_opt_strs+3146)
+#define BENCHMARK_TLS_CIPHERS_DESC      (gnutls_cli_opt_strs+3150)
+#define BENCHMARK_TLS_CIPHERS_NAME      (gnutls_cli_opt_strs+3172)
+#define BENCHMARK_TLS_CIPHERS_name      (gnutls_cli_opt_strs+3194)
 #define BENCHMARK_TLS_CIPHERS_FLAGS     (OPTST_DISABLED)
 
 /*
  *  list option description:
  */
-#define LIST_DESC      (gnutls_cli_opt_strs+3168)
-#define LIST_NAME      (gnutls_cli_opt_strs+3219)
-#define LIST_name      (gnutls_cli_opt_strs+3224)
+#define LIST_DESC      (gnutls_cli_opt_strs+3216)
+#define LIST_NAME      (gnutls_cli_opt_strs+3267)
+#define LIST_name      (gnutls_cli_opt_strs+3272)
 #define LIST_FLAGS     (OPTST_DISABLED)
 
 /*
  *  Help/More_Help/Version option descriptions:
  */
-#define HELP_DESC       (gnutls_cli_opt_strs+3229)
-#define HELP_name       (gnutls_cli_opt_strs+3273)
+#define HELP_DESC       (gnutls_cli_opt_strs+3277)
+#define HELP_name       (gnutls_cli_opt_strs+3321)
 #ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC  (gnutls_cli_opt_strs+3278)
-#define MORE_HELP_name  (gnutls_cli_opt_strs+3323)
+#define MORE_HELP_DESC  (gnutls_cli_opt_strs+3326)
+#define MORE_HELP_name  (gnutls_cli_opt_strs+3371)
 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
 #else
 #define MORE_HELP_DESC  NULL
@@ -616,8 +628,8 @@ static char const gnutls_cli_opt_strs[3808] =
 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
 #endif
-#define VER_DESC        (gnutls_cli_opt_strs+3333)
-#define VER_name        (gnutls_cli_opt_strs+3369)
+#define VER_DESC        (gnutls_cli_opt_strs+3381)
+#define VER_name        (gnutls_cli_opt_strs+3417)
 /*
  *  Declare option callback procedures
  */
@@ -818,8 +830,20 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 15, VALUE_OPT_CRLF,
-     /* equiv idx, value */ 15, VALUE_OPT_CRLF,
+  {  /* entry idx, value */ 15, VALUE_OPT_SRTP_PROFILES,
+     /* equiv idx, value */ 15, VALUE_OPT_SRTP_PROFILES,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRTP_PROFILES_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srtp_profiles */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, 
SRTP_PROFILES_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 16, VALUE_OPT_CRLF,
+     /* equiv idx, value */ 16, VALUE_OPT_CRLF,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ CRLF_FLAGS, 0,
@@ -830,8 +854,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ CRLF_DESC, CRLF_NAME, CRLF_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 16, VALUE_OPT_X509FMTDER,
-     /* equiv idx, value */ 16, VALUE_OPT_X509FMTDER,
+  {  /* entry idx, value */ 17, VALUE_OPT_X509FMTDER,
+     /* equiv idx, value */ 17, VALUE_OPT_X509FMTDER,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509FMTDER_FLAGS, 0,
@@ -842,8 +866,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 17, VALUE_OPT_FINGERPRINT,
-     /* equiv idx, value */ 17, VALUE_OPT_FINGERPRINT,
+  {  /* entry idx, value */ 18, VALUE_OPT_FINGERPRINT,
+     /* equiv idx, value */ 18, VALUE_OPT_FINGERPRINT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ FINGERPRINT_FLAGS, 0,
@@ -854,8 +878,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ FINGERPRINT_DESC, FINGERPRINT_NAME, 
FINGERPRINT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 18, VALUE_OPT_DISABLE_EXTENSIONS,
-     /* equiv idx, value */ 18, VALUE_OPT_DISABLE_EXTENSIONS,
+  {  /* entry idx, value */ 19, VALUE_OPT_DISABLE_EXTENSIONS,
+     /* equiv idx, value */ 19, VALUE_OPT_DISABLE_EXTENSIONS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ DISABLE_EXTENSIONS_FLAGS, 0,
@@ -866,8 +890,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ DISABLE_EXTENSIONS_DESC, DISABLE_EXTENSIONS_NAME, 
DISABLE_EXTENSIONS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 19, VALUE_OPT_PRINT_CERT,
-     /* equiv idx, value */ 19, VALUE_OPT_PRINT_CERT,
+  {  /* entry idx, value */ 20, VALUE_OPT_PRINT_CERT,
+     /* equiv idx, value */ 20, VALUE_OPT_PRINT_CERT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PRINT_CERT_FLAGS, 0,
@@ -878,8 +902,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PRINT_CERT_DESC, PRINT_CERT_NAME, PRINT_CERT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 20, VALUE_OPT_RECORDSIZE,
-     /* equiv idx, value */ 20, VALUE_OPT_RECORDSIZE,
+  {  /* entry idx, value */ 21, VALUE_OPT_RECORDSIZE,
+     /* equiv idx, value */ 21, VALUE_OPT_RECORDSIZE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ RECORDSIZE_FLAGS, 0,
@@ -890,8 +914,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ RECORDSIZE_DESC, RECORDSIZE_NAME, RECORDSIZE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 21, VALUE_OPT_DH_BITS,
-     /* equiv idx, value */ 21, VALUE_OPT_DH_BITS,
+  {  /* entry idx, value */ 22, VALUE_OPT_DH_BITS,
+     /* equiv idx, value */ 22, VALUE_OPT_DH_BITS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ DH_BITS_FLAGS, 0,
@@ -902,8 +926,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ DH_BITS_DESC, DH_BITS_NAME, DH_BITS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 22, VALUE_OPT_PRIORITY,
-     /* equiv idx, value */ 22, VALUE_OPT_PRIORITY,
+  {  /* entry idx, value */ 23, VALUE_OPT_PRIORITY,
+     /* equiv idx, value */ 23, VALUE_OPT_PRIORITY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PRIORITY_FLAGS, 0,
@@ -914,8 +938,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 23, VALUE_OPT_X509CAFILE,
-     /* equiv idx, value */ 23, VALUE_OPT_X509CAFILE,
+  {  /* entry idx, value */ 24, VALUE_OPT_X509CAFILE,
+     /* equiv idx, value */ 24, VALUE_OPT_X509CAFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CAFILE_FLAGS, 0,
@@ -926,8 +950,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 24, VALUE_OPT_X509CRLFILE,
-     /* equiv idx, value */ 24, VALUE_OPT_X509CRLFILE,
+  {  /* entry idx, value */ 25, VALUE_OPT_X509CRLFILE,
+     /* equiv idx, value */ 25, VALUE_OPT_X509CRLFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CRLFILE_FLAGS, 0,
@@ -938,8 +962,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, 
X509CRLFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 25, VALUE_OPT_PGPKEYFILE,
-     /* equiv idx, value */ 25, VALUE_OPT_PGPKEYFILE,
+  {  /* entry idx, value */ 26, VALUE_OPT_PGPKEYFILE,
+     /* equiv idx, value */ 26, VALUE_OPT_PGPKEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPKEYFILE_FLAGS, 0,
@@ -950,8 +974,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 26, VALUE_OPT_PGPKEYRING,
-     /* equiv idx, value */ 26, VALUE_OPT_PGPKEYRING,
+  {  /* entry idx, value */ 27, VALUE_OPT_PGPKEYRING,
+     /* equiv idx, value */ 27, VALUE_OPT_PGPKEYRING,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPKEYRING_FLAGS, 0,
@@ -962,8 +986,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 27, VALUE_OPT_PGPCERTFILE,
-     /* equiv idx, value */ 27, VALUE_OPT_PGPCERTFILE,
+  {  /* entry idx, value */ 28, VALUE_OPT_PGPCERTFILE,
+     /* equiv idx, value */ 28, VALUE_OPT_PGPCERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPCERTFILE_FLAGS, 0,
@@ -974,8 +998,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, 
PGPCERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 28, VALUE_OPT_X509KEYFILE,
-     /* equiv idx, value */ 28, VALUE_OPT_X509KEYFILE,
+  {  /* entry idx, value */ 29, VALUE_OPT_X509KEYFILE,
+     /* equiv idx, value */ 29, VALUE_OPT_X509KEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509KEYFILE_FLAGS, 0,
@@ -986,8 +1010,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, 
X509KEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 29, VALUE_OPT_X509CERTFILE,
-     /* equiv idx, value */ 29, VALUE_OPT_X509CERTFILE,
+  {  /* entry idx, value */ 30, VALUE_OPT_X509CERTFILE,
+     /* equiv idx, value */ 30, VALUE_OPT_X509CERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CERTFILE_FLAGS, 0,
@@ -998,8 +1022,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, 
X509CERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 30, VALUE_OPT_PGPSUBKEY,
-     /* equiv idx, value */ 30, VALUE_OPT_PGPSUBKEY,
+  {  /* entry idx, value */ 31, VALUE_OPT_PGPSUBKEY,
+     /* equiv idx, value */ 31, VALUE_OPT_PGPSUBKEY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPSUBKEY_FLAGS, 0,
@@ -1010,8 +1034,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 31, VALUE_OPT_SRPUSERNAME,
-     /* equiv idx, value */ 31, VALUE_OPT_SRPUSERNAME,
+  {  /* entry idx, value */ 32, VALUE_OPT_SRPUSERNAME,
+     /* equiv idx, value */ 32, VALUE_OPT_SRPUSERNAME,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SRPUSERNAME_FLAGS, 0,
@@ -1022,8 +1046,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ SRPUSERNAME_DESC, SRPUSERNAME_NAME, 
SRPUSERNAME_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 32, VALUE_OPT_SRPPASSWD,
-     /* equiv idx, value */ 32, VALUE_OPT_SRPPASSWD,
+  {  /* entry idx, value */ 33, VALUE_OPT_SRPPASSWD,
+     /* equiv idx, value */ 33, VALUE_OPT_SRPPASSWD,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SRPPASSWD_FLAGS, 0,
@@ -1034,8 +1058,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 33, VALUE_OPT_PSKUSERNAME,
-     /* equiv idx, value */ 33, VALUE_OPT_PSKUSERNAME,
+  {  /* entry idx, value */ 34, VALUE_OPT_PSKUSERNAME,
+     /* equiv idx, value */ 34, VALUE_OPT_PSKUSERNAME,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PSKUSERNAME_FLAGS, 0,
@@ -1046,8 +1070,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PSKUSERNAME_DESC, PSKUSERNAME_NAME, 
PSKUSERNAME_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 34, VALUE_OPT_PSKKEY,
-     /* equiv idx, value */ 34, VALUE_OPT_PSKKEY,
+  {  /* entry idx, value */ 35, VALUE_OPT_PSKKEY,
+     /* equiv idx, value */ 35, VALUE_OPT_PSKKEY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PSKKEY_FLAGS, 0,
@@ -1058,8 +1082,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PSKKEY_DESC, PSKKEY_NAME, PSKKEY_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 35, VALUE_OPT_PORT,
-     /* equiv idx, value */ 35, VALUE_OPT_PORT,
+  {  /* entry idx, value */ 36, VALUE_OPT_PORT,
+     /* equiv idx, value */ 36, VALUE_OPT_PORT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PORT_FLAGS, 0,
@@ -1070,8 +1094,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 36, VALUE_OPT_INSECURE,
-     /* equiv idx, value */ 36, VALUE_OPT_INSECURE,
+  {  /* entry idx, value */ 37, VALUE_OPT_INSECURE,
+     /* equiv idx, value */ 37, VALUE_OPT_INSECURE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ INSECURE_FLAGS, 0,
@@ -1082,8 +1106,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ INSECURE_DESC, INSECURE_NAME, INSECURE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 37, VALUE_OPT_BENCHMARK_CIPHERS,
-     /* equiv idx, value */ 37, VALUE_OPT_BENCHMARK_CIPHERS,
+  {  /* entry idx, value */ 38, VALUE_OPT_BENCHMARK_CIPHERS,
+     /* equiv idx, value */ 38, VALUE_OPT_BENCHMARK_CIPHERS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ BENCHMARK_CIPHERS_FLAGS, 0,
@@ -1094,8 +1118,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ BENCHMARK_CIPHERS_DESC, BENCHMARK_CIPHERS_NAME, 
BENCHMARK_CIPHERS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 38, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
-     /* equiv idx, value */ 38, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
+  {  /* entry idx, value */ 39, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
+     /* equiv idx, value */ 39, VALUE_OPT_BENCHMARK_SOFT_CIPHERS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ BENCHMARK_SOFT_CIPHERS_FLAGS, 0,
@@ -1106,8 +1130,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ BENCHMARK_SOFT_CIPHERS_DESC, 
BENCHMARK_SOFT_CIPHERS_NAME, BENCHMARK_SOFT_CIPHERS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 39, VALUE_OPT_BENCHMARK_TLS_KX,
-     /* equiv idx, value */ 39, VALUE_OPT_BENCHMARK_TLS_KX,
+  {  /* entry idx, value */ 40, VALUE_OPT_BENCHMARK_TLS_KX,
+     /* equiv idx, value */ 40, VALUE_OPT_BENCHMARK_TLS_KX,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ BENCHMARK_TLS_KX_FLAGS, 0,
@@ -1118,8 +1142,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ BENCHMARK_TLS_KX_DESC, BENCHMARK_TLS_KX_NAME, 
BENCHMARK_TLS_KX_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 40, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
-     /* equiv idx, value */ 40, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
+  {  /* entry idx, value */ 41, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
+     /* equiv idx, value */ 41, VALUE_OPT_BENCHMARK_TLS_CIPHERS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ BENCHMARK_TLS_CIPHERS_FLAGS, 0,
@@ -1130,8 +1154,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ BENCHMARK_TLS_CIPHERS_DESC, 
BENCHMARK_TLS_CIPHERS_NAME, BENCHMARK_TLS_CIPHERS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 41, VALUE_OPT_LIST,
-     /* equiv idx, value */ 41, VALUE_OPT_LIST,
+  {  /* entry idx, value */ 42, VALUE_OPT_LIST,
+     /* equiv idx, value */ 42, VALUE_OPT_LIST,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ LIST_FLAGS, 0,
@@ -1186,14 +1210,14 @@ static tOptDesc optDesc[OPTION_CT] = {
  *
  *  Define the gnutls-cli Option Environment
  */
-#define zPROGNAME       (gnutls_cli_opt_strs+3377)
-#define zUsageTitle     (gnutls_cli_opt_strs+3388)
+#define zPROGNAME       (gnutls_cli_opt_strs+3425)
+#define zUsageTitle     (gnutls_cli_opt_strs+3436)
 #define zRcName         NULL
 #define apzHomeList     NULL
-#define zBugsAddr       (gnutls_cli_opt_strs+3501)
-#define zExplain        (gnutls_cli_opt_strs+3520)
-#define zDetail         (gnutls_cli_opt_strs+3523)
-#define zFullVersion    (gnutls_cli_opt_strs+3707)
+#define zBugsAddr       (gnutls_cli_opt_strs+3549)
+#define zExplain        (gnutls_cli_opt_strs+3568)
+#define zDetail         (gnutls_cli_opt_strs+3571)
+#define zFullVersion    (gnutls_cli_opt_strs+3755)
 /* extracted from optcode.tlib near line 350 */
 
 #if defined(ENABLE_NLS)
@@ -1207,7 +1231,7 @@ static tOptDesc optDesc[OPTION_CT] = {
 
 #define gnutls_cli_full_usage (NULL)
 
-#define gnutls_cli_short_usage (gnutls_cli_opt_strs+3728)
+#define gnutls_cli_short_usage (gnutls_cli_opt_strs+3776)
 
 #endif /* not defined __doxygen__ */
 
@@ -1485,7 +1509,7 @@ tOptions gnutls_cliOptions = {
       NO_EQUIVALENT, /* '-#' option index */
       NO_EQUIVALENT /* index of default opt */
     },
-    45 /* full option count */, 42 /* user option count */,
+    46 /* full option count */, 43 /* user option count */,
     gnutls_cli_full_usage, gnutls_cli_short_usage,
     NULL, NULL,
     PKGDATADIR, gnutls_cli_packager_info
diff --git a/src/cli-args.def b/src/cli-args.def
index 85952d7..8fafbf4 100644
--- a/src/cli-args.def
+++ b/src/cli-args.def
@@ -113,6 +113,13 @@ flag = {
 };
 
 flag = {
+    name      = srtp_profiles;
+    arg-type  = string;
+    descrip   = "Offer SRTP profiles";
+    doc       = "";
+};
+
+flag = {
     name      = crlf;
     descrip   = "Send CR LF instead of LF";
     doc      = "";
diff --git a/src/cli-args.h b/src/cli-args.h
index f664a70..384c7d0 100644
--- a/src/cli-args.h
+++ b/src/cli-args.h
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (cli-args.h)
  *  
- *  It has been AutoGen-ed  October 13, 2012 at 08:48:21 PM by AutoGen 5.16
+ *  It has been AutoGen-ed  November  1, 2012 at 03:36:16 PM by AutoGen 5.16
  *  From the definitions    cli-args.def
  *  and the template file   options
  *
@@ -82,39 +82,40 @@ typedef enum {
     INDEX_OPT_STARTTLS                = 12,
     INDEX_OPT_UDP                     = 13,
     INDEX_OPT_MTU                     = 14,
-    INDEX_OPT_CRLF                    = 15,
-    INDEX_OPT_X509FMTDER              = 16,
-    INDEX_OPT_FINGERPRINT             = 17,
-    INDEX_OPT_DISABLE_EXTENSIONS      = 18,
-    INDEX_OPT_PRINT_CERT              = 19,
-    INDEX_OPT_RECORDSIZE              = 20,
-    INDEX_OPT_DH_BITS                 = 21,
-    INDEX_OPT_PRIORITY                = 22,
-    INDEX_OPT_X509CAFILE              = 23,
-    INDEX_OPT_X509CRLFILE             = 24,
-    INDEX_OPT_PGPKEYFILE              = 25,
-    INDEX_OPT_PGPKEYRING              = 26,
-    INDEX_OPT_PGPCERTFILE             = 27,
-    INDEX_OPT_X509KEYFILE             = 28,
-    INDEX_OPT_X509CERTFILE            = 29,
-    INDEX_OPT_PGPSUBKEY               = 30,
-    INDEX_OPT_SRPUSERNAME             = 31,
-    INDEX_OPT_SRPPASSWD               = 32,
-    INDEX_OPT_PSKUSERNAME             = 33,
-    INDEX_OPT_PSKKEY                  = 34,
-    INDEX_OPT_PORT                    = 35,
-    INDEX_OPT_INSECURE                = 36,
-    INDEX_OPT_BENCHMARK_CIPHERS       = 37,
-    INDEX_OPT_BENCHMARK_SOFT_CIPHERS  = 38,
-    INDEX_OPT_BENCHMARK_TLS_KX        = 39,
-    INDEX_OPT_BENCHMARK_TLS_CIPHERS   = 40,
-    INDEX_OPT_LIST                    = 41,
-    INDEX_OPT_VERSION                 = 42,
-    INDEX_OPT_HELP                    = 43,
-    INDEX_OPT_MORE_HELP               = 44
+    INDEX_OPT_SRTP_PROFILES           = 15,
+    INDEX_OPT_CRLF                    = 16,
+    INDEX_OPT_X509FMTDER              = 17,
+    INDEX_OPT_FINGERPRINT             = 18,
+    INDEX_OPT_DISABLE_EXTENSIONS      = 19,
+    INDEX_OPT_PRINT_CERT              = 20,
+    INDEX_OPT_RECORDSIZE              = 21,
+    INDEX_OPT_DH_BITS                 = 22,
+    INDEX_OPT_PRIORITY                = 23,
+    INDEX_OPT_X509CAFILE              = 24,
+    INDEX_OPT_X509CRLFILE             = 25,
+    INDEX_OPT_PGPKEYFILE              = 26,
+    INDEX_OPT_PGPKEYRING              = 27,
+    INDEX_OPT_PGPCERTFILE             = 28,
+    INDEX_OPT_X509KEYFILE             = 29,
+    INDEX_OPT_X509CERTFILE            = 30,
+    INDEX_OPT_PGPSUBKEY               = 31,
+    INDEX_OPT_SRPUSERNAME             = 32,
+    INDEX_OPT_SRPPASSWD               = 33,
+    INDEX_OPT_PSKUSERNAME             = 34,
+    INDEX_OPT_PSKKEY                  = 35,
+    INDEX_OPT_PORT                    = 36,
+    INDEX_OPT_INSECURE                = 37,
+    INDEX_OPT_BENCHMARK_CIPHERS       = 38,
+    INDEX_OPT_BENCHMARK_SOFT_CIPHERS  = 39,
+    INDEX_OPT_BENCHMARK_TLS_KX        = 40,
+    INDEX_OPT_BENCHMARK_TLS_CIPHERS   = 41,
+    INDEX_OPT_LIST                    = 42,
+    INDEX_OPT_VERSION                 = 43,
+    INDEX_OPT_HELP                    = 44,
+    INDEX_OPT_MORE_HELP               = 45
 } teOptIndex;
 
-#define OPTION_CT    45
+#define OPTION_CT    46
 #define GNUTLS_CLI_VERSION       "@VERSION@"
 #define GNUTLS_CLI_FULL_VERSION  "gnutls-cli @VERSION@"
 
@@ -171,36 +172,37 @@ typedef enum {
 #define VALUE_OPT_MTU            14
 
 #define OPT_VALUE_MTU            (DESC(MTU).optArg.argInt)
-#define VALUE_OPT_CRLF           15
-#define VALUE_OPT_X509FMTDER     16
+#define VALUE_OPT_SRTP_PROFILES  15
+#define VALUE_OPT_CRLF           16
+#define VALUE_OPT_X509FMTDER     17
 #define VALUE_OPT_FINGERPRINT    'f'
-#define VALUE_OPT_DISABLE_EXTENSIONS 18
-#define VALUE_OPT_PRINT_CERT     19
-#define VALUE_OPT_RECORDSIZE     20
+#define VALUE_OPT_DISABLE_EXTENSIONS 19
+#define VALUE_OPT_PRINT_CERT     20
+#define VALUE_OPT_RECORDSIZE     21
 
 #define OPT_VALUE_RECORDSIZE     (DESC(RECORDSIZE).optArg.argInt)
-#define VALUE_OPT_DH_BITS        21
+#define VALUE_OPT_DH_BITS        22
 
 #define OPT_VALUE_DH_BITS        (DESC(DH_BITS).optArg.argInt)
-#define VALUE_OPT_PRIORITY       22
-#define VALUE_OPT_X509CAFILE     23
-#define VALUE_OPT_X509CRLFILE    24
-#define VALUE_OPT_PGPKEYFILE     25
-#define VALUE_OPT_PGPKEYRING     26
-#define VALUE_OPT_PGPCERTFILE    27
-#define VALUE_OPT_X509KEYFILE    28
-#define VALUE_OPT_X509CERTFILE   29
-#define VALUE_OPT_PGPSUBKEY      30
-#define VALUE_OPT_SRPUSERNAME    31
-#define VALUE_OPT_SRPPASSWD      32
-#define VALUE_OPT_PSKUSERNAME    129
-#define VALUE_OPT_PSKKEY         130
+#define VALUE_OPT_PRIORITY       23
+#define VALUE_OPT_X509CAFILE     24
+#define VALUE_OPT_X509CRLFILE    25
+#define VALUE_OPT_PGPKEYFILE     26
+#define VALUE_OPT_PGPKEYRING     27
+#define VALUE_OPT_PGPCERTFILE    28
+#define VALUE_OPT_X509KEYFILE    29
+#define VALUE_OPT_X509CERTFILE   30
+#define VALUE_OPT_PGPSUBKEY      31
+#define VALUE_OPT_SRPUSERNAME    32
+#define VALUE_OPT_SRPPASSWD      129
+#define VALUE_OPT_PSKUSERNAME    130
+#define VALUE_OPT_PSKKEY         131
 #define VALUE_OPT_PORT           'p'
-#define VALUE_OPT_INSECURE       132
-#define VALUE_OPT_BENCHMARK_CIPHERS 133
-#define VALUE_OPT_BENCHMARK_SOFT_CIPHERS 134
-#define VALUE_OPT_BENCHMARK_TLS_KX 135
-#define VALUE_OPT_BENCHMARK_TLS_CIPHERS 136
+#define VALUE_OPT_INSECURE       133
+#define VALUE_OPT_BENCHMARK_CIPHERS 134
+#define VALUE_OPT_BENCHMARK_SOFT_CIPHERS 135
+#define VALUE_OPT_BENCHMARK_TLS_KX 136
+#define VALUE_OPT_BENCHMARK_TLS_CIPHERS 137
 #define VALUE_OPT_LIST           'l'
 #define VALUE_OPT_HELP          'h'
 #define VALUE_OPT_MORE_HELP     '!'
diff --git a/src/cli.c b/src/cli.c
index a454606..6064ad4 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -675,6 +675,15 @@ init_tls_session (const char *hostname)
   if (HAVE_OPT(HEARTBEAT))
     gnutls_heartbeat_enable (session, GNUTLS_HB_PEER_ALLOWED_TO_SEND);
 
+  if (HAVE_OPT(SRTP_PROFILES))
+    {
+      ret = gnutls_srtp_set_profile_direct (session, OPT_ARG(SRTP_PROFILES), 
&err);
+      if (ret == GNUTLS_E_INVALID_REQUEST) fprintf (stderr, "Syntax error at: 
%s\n", err);
+      else 
+        fprintf(stderr, "Error in priorities: %s\n", gnutls_strerror(ret));
+      exit (1);
+    }
+
   return session;
 }
 
diff --git a/src/common.c b/src/common.c
index 42ac6b6..7841d43 100644
--- a/src/common.c
+++ b/src/common.c
@@ -456,6 +456,8 @@ print_info (gnutls_session_t session, int verbose, int 
print_cert)
     gnutls_kx_algorithm_t kx;
     unsigned char session_id[33];
     size_t session_id_size = sizeof (session_id);
+    gnutls_srtp_profile_t srtp_profile;
+    int rc;
 
     /* print session ID */
     gnutls_session_get_id (session, session_id, &session_id_size);
@@ -551,10 +553,13 @@ print_info (gnutls_session_t session, int verbose, int 
print_cert)
             (gnutls_compression_get (session)));
     printf ("- Compression: %s\n", tmp);
 
+    rc = gnutls_srtp_get_selected_profile (session, &srtp_profile);
+    if (rc == 0)
+      printf ("- SRTP profile: %s\n", gnutls_srtp_get_profile_name 
(srtp_profile));
+
     if (verbose)
       {
           gnutls_datum_t cb;
-          int rc;
 
           rc = gnutls_session_channel_binding (session,
                                                GNUTLS_CB_TLS_UNIQUE, &cb);
diff --git a/src/serv-args.c b/src/serv-args.c
index 35dafc1..9f9f3aa 100644
--- a/src/serv-args.c
+++ b/src/serv-args.c
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (serv-args.c)
  *  
- *  It has been AutoGen-ed  September 30, 2012 at 03:29:31 PM by AutoGen 5.16
+ *  It has been AutoGen-ed  November  1, 2012 at 03:36:17 PM by AutoGen 5.16
  *  From the definitions    serv-args.def
  *  and the template file   options
  *
@@ -67,7 +67,7 @@ extern FILE * option_usage_fp;
 /*
  *  gnutls-serv option static const strings
  */
-static char const gnutls_serv_opt_strs[3058] =
+static char const gnutls_serv_opt_strs[3106] =
 /*     0 */ "gnutls-serv @address@hidden"
             "Copyright (C) 2000-2012 Free Software Foundation, all rights 
reserved.\n"
             "This is free software. It is licensed for use, modification and\n"
@@ -111,94 +111,97 @@ static char const gnutls_serv_opt_strs[3058] =
 /*  1221 */ "Set MTU for datagram TLS\0"
 /*  1246 */ "MTU\0"
 /*  1250 */ "mtu\0"
-/*  1254 */ "Do not request a client certificate\0"
-/*  1290 */ "DISABLE_CLIENT_CERT\0"
-/*  1310 */ "disable-client-cert\0"
-/*  1330 */ "Require a client certificate\0"
-/*  1359 */ "REQUIRE_CLIENT_CERT\0"
-/*  1379 */ "require-client-cert\0"
-/*  1399 */ "Activate heartbeat support\0"
-/*  1426 */ "HEARTBEAT\0"
-/*  1436 */ "heartbeat\0"
-/*  1446 */ "Use DER format for certificates to read from\0"
-/*  1491 */ "X509FMTDER\0"
-/*  1502 */ "x509fmtder\0"
-/*  1513 */ "Priorities string\0"
-/*  1531 */ "PRIORITY\0"
-/*  1540 */ "priority\0"
-/*  1549 */ "DH params file to use\0"
-/*  1571 */ "DHPARAMS\0"
-/*  1580 */ "dhparams\0"
-/*  1589 */ "Certificate file or PKCS #11 URL to use\0"
-/*  1629 */ "X509CAFILE\0"
-/*  1640 */ "x509cafile\0"
-/*  1651 */ "CRL file to use\0"
-/*  1667 */ "X509CRLFILE\0"
-/*  1679 */ "x509crlfile\0"
-/*  1691 */ "PGP Key file to use\0"
-/*  1711 */ "PGPKEYFILE\0"
-/*  1722 */ "pgpkeyfile\0"
-/*  1733 */ "PGP Key ring file to use\0"
-/*  1758 */ "PGPKEYRING\0"
-/*  1769 */ "pgpkeyring\0"
-/*  1780 */ "PGP Public Key (certificate) file to use\0"
-/*  1821 */ "PGPCERTFILE\0"
-/*  1833 */ "pgpcertfile\0"
-/*  1845 */ "X.509 key file or PKCS #11 URL to use\0"
-/*  1883 */ "X509KEYFILE\0"
-/*  1895 */ "x509keyfile\0"
-/*  1907 */ "X.509 Certificate file or PKCS #11 URL to use\0"
-/*  1953 */ "X509CERTFILE\0"
-/*  1966 */ "x509certfile\0"
-/*  1979 */ "Alternative X.509 key file or PKCS #11 URL to use\0"
-/*  2029 */ "X509DSAKEYFILE\0"
-/*  2044 */ "x509dsakeyfile\0"
-/*  2059 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0"
-/*  2117 */ "X509DSACERTFILE\0"
-/*  2133 */ "x509dsacertfile\0"
-/*  2149 */ "X509ECCKEYFILE\0"
-/*  2164 */ "x509ecckeyfile\0"
-/*  2179 */ "X509ECCCERTFILE\0"
-/*  2195 */ "x509ecccertfile\0"
-/*  2211 */ "PGP subkey to use (hex or auto)\0"
-/*  2243 */ "PGPSUBKEY\0"
-/*  2253 */ "pgpsubkey\0"
-/*  2263 */ "SRP password file to use\0"
-/*  2288 */ "SRPPASSWD\0"
-/*  2298 */ "srppasswd\0"
-/*  2308 */ "SRP password configuration file to use\0"
-/*  2347 */ "SRPPASSWDCONF\0"
-/*  2361 */ "srppasswdconf\0"
-/*  2375 */ "PSK password file to use\0"
-/*  2400 */ "PSKPASSWD\0"
-/*  2410 */ "pskpasswd\0"
-/*  2420 */ "PSK identity hint to use\0"
-/*  2445 */ "PSKHINT\0"
-/*  2453 */ "pskhint\0"
-/*  2461 */ "The OCSP response to send to client\0"
-/*  2497 */ "OCSP_RESPONSE\0"
-/*  2511 */ "ocsp-response\0"
-/*  2525 */ "The port to connect to\0"
-/*  2548 */ "PORT\0"
-/*  2553 */ "port\0"
-/*  2558 */ "Print a list of the supported algorithms and modes\0"
-/*  2609 */ "LIST\0"
-/*  2614 */ "list\0"
-/*  2619 */ "Display extended usage information and exit\0"
-/*  2663 */ "help\0"
-/*  2668 */ "Extended usage information passed thru pager\0"
-/*  2713 */ "more-help\0"
-/*  2723 */ "Output version information and exit\0"
-/*  2759 */ "version\0"
-/*  2767 */ "GNUTLS_SERV\0"
-/*  2779 */ "gnutls-serv - GnuTLS server - Ver. @address@hidden"
+/*  1254 */ "Offer SRTP profiles\0"
+/*  1274 */ "SRTP_PROFILES\0"
+/*  1288 */ "srtp-profiles\0"
+/*  1302 */ "Do not request a client certificate\0"
+/*  1338 */ "DISABLE_CLIENT_CERT\0"
+/*  1358 */ "disable-client-cert\0"
+/*  1378 */ "Require a client certificate\0"
+/*  1407 */ "REQUIRE_CLIENT_CERT\0"
+/*  1427 */ "require-client-cert\0"
+/*  1447 */ "Activate heartbeat support\0"
+/*  1474 */ "HEARTBEAT\0"
+/*  1484 */ "heartbeat\0"
+/*  1494 */ "Use DER format for certificates to read from\0"
+/*  1539 */ "X509FMTDER\0"
+/*  1550 */ "x509fmtder\0"
+/*  1561 */ "Priorities string\0"
+/*  1579 */ "PRIORITY\0"
+/*  1588 */ "priority\0"
+/*  1597 */ "DH params file to use\0"
+/*  1619 */ "DHPARAMS\0"
+/*  1628 */ "dhparams\0"
+/*  1637 */ "Certificate file or PKCS #11 URL to use\0"
+/*  1677 */ "X509CAFILE\0"
+/*  1688 */ "x509cafile\0"
+/*  1699 */ "CRL file to use\0"
+/*  1715 */ "X509CRLFILE\0"
+/*  1727 */ "x509crlfile\0"
+/*  1739 */ "PGP Key file to use\0"
+/*  1759 */ "PGPKEYFILE\0"
+/*  1770 */ "pgpkeyfile\0"
+/*  1781 */ "PGP Key ring file to use\0"
+/*  1806 */ "PGPKEYRING\0"
+/*  1817 */ "pgpkeyring\0"
+/*  1828 */ "PGP Public Key (certificate) file to use\0"
+/*  1869 */ "PGPCERTFILE\0"
+/*  1881 */ "pgpcertfile\0"
+/*  1893 */ "X.509 key file or PKCS #11 URL to use\0"
+/*  1931 */ "X509KEYFILE\0"
+/*  1943 */ "x509keyfile\0"
+/*  1955 */ "X.509 Certificate file or PKCS #11 URL to use\0"
+/*  2001 */ "X509CERTFILE\0"
+/*  2014 */ "x509certfile\0"
+/*  2027 */ "Alternative X.509 key file or PKCS #11 URL to use\0"
+/*  2077 */ "X509DSAKEYFILE\0"
+/*  2092 */ "x509dsakeyfile\0"
+/*  2107 */ "Alternative X.509 Certificate file or PKCS #11 URL to use\0"
+/*  2165 */ "X509DSACERTFILE\0"
+/*  2181 */ "x509dsacertfile\0"
+/*  2197 */ "X509ECCKEYFILE\0"
+/*  2212 */ "x509ecckeyfile\0"
+/*  2227 */ "X509ECCCERTFILE\0"
+/*  2243 */ "x509ecccertfile\0"
+/*  2259 */ "PGP subkey to use (hex or auto)\0"
+/*  2291 */ "PGPSUBKEY\0"
+/*  2301 */ "pgpsubkey\0"
+/*  2311 */ "SRP password file to use\0"
+/*  2336 */ "SRPPASSWD\0"
+/*  2346 */ "srppasswd\0"
+/*  2356 */ "SRP password configuration file to use\0"
+/*  2395 */ "SRPPASSWDCONF\0"
+/*  2409 */ "srppasswdconf\0"
+/*  2423 */ "PSK password file to use\0"
+/*  2448 */ "PSKPASSWD\0"
+/*  2458 */ "pskpasswd\0"
+/*  2468 */ "PSK identity hint to use\0"
+/*  2493 */ "PSKHINT\0"
+/*  2501 */ "pskhint\0"
+/*  2509 */ "The OCSP response to send to client\0"
+/*  2545 */ "OCSP_RESPONSE\0"
+/*  2559 */ "ocsp-response\0"
+/*  2573 */ "The port to connect to\0"
+/*  2596 */ "PORT\0"
+/*  2601 */ "port\0"
+/*  2606 */ "Print a list of the supported algorithms and modes\0"
+/*  2657 */ "LIST\0"
+/*  2662 */ "list\0"
+/*  2667 */ "Display extended usage information and exit\0"
+/*  2711 */ "help\0"
+/*  2716 */ "Extended usage information passed thru pager\0"
+/*  2761 */ "more-help\0"
+/*  2771 */ "Output version information and exit\0"
+/*  2807 */ "version\0"
+/*  2815 */ "GNUTLS_SERV\0"
+/*  2827 */ "gnutls-serv - GnuTLS server - Ver. @address@hidden"
             "USAGE:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
-/*  2882 */ "address@hidden"
-/*  2901 */ "\n\n\0"
-/*  2904 */ "\n"
+/*  2930 */ "address@hidden"
+/*  2949 */ "\n\n\0"
+/*  2952 */ "\n"
             "Server program that listens to incoming TLS connections.\n\0"
-/*  2963 */ "gnutls-serv @address@hidden"
-/*  2985 */ "Usage: gnutls-serv [options]\n"
+/*  3011 */ "gnutls-serv @address@hidden"
+/*  3033 */ "Usage: gnutls-serv [options]\n"
             "gnutls-serv --help for usage instructions.\n";
 
 /*
@@ -276,233 +279,242 @@ static char const gnutls_serv_opt_strs[3058] =
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
+ *  srtp_profiles option description:
+ */
+#define SRTP_PROFILES_DESC      (gnutls_serv_opt_strs+1254)
+#define SRTP_PROFILES_NAME      (gnutls_serv_opt_strs+1274)
+#define SRTP_PROFILES_name      (gnutls_serv_opt_strs+1288)
+#define SRTP_PROFILES_FLAGS     (OPTST_DISABLED \
+        | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
+
+/*
  *  disable-client-cert option description:
  */
-#define DISABLE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1254)
-#define DISABLE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1290)
-#define DISABLE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1310)
+#define DISABLE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1302)
+#define DISABLE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1338)
+#define DISABLE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1358)
 #define DISABLE_CLIENT_CERT_FLAGS     (OPTST_DISABLED)
 
 /*
  *  require-client-cert option description:
  */
-#define REQUIRE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1330)
-#define REQUIRE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1359)
-#define REQUIRE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1379)
+#define REQUIRE_CLIENT_CERT_DESC      (gnutls_serv_opt_strs+1378)
+#define REQUIRE_CLIENT_CERT_NAME      (gnutls_serv_opt_strs+1407)
+#define REQUIRE_CLIENT_CERT_name      (gnutls_serv_opt_strs+1427)
 #define REQUIRE_CLIENT_CERT_FLAGS     (OPTST_DISABLED)
 
 /*
  *  heartbeat option description:
  */
-#define HEARTBEAT_DESC      (gnutls_serv_opt_strs+1399)
-#define HEARTBEAT_NAME      (gnutls_serv_opt_strs+1426)
-#define HEARTBEAT_name      (gnutls_serv_opt_strs+1436)
+#define HEARTBEAT_DESC      (gnutls_serv_opt_strs+1447)
+#define HEARTBEAT_NAME      (gnutls_serv_opt_strs+1474)
+#define HEARTBEAT_name      (gnutls_serv_opt_strs+1484)
 #define HEARTBEAT_FLAGS     (OPTST_DISABLED)
 
 /*
  *  x509fmtder option description:
  */
-#define X509FMTDER_DESC      (gnutls_serv_opt_strs+1446)
-#define X509FMTDER_NAME      (gnutls_serv_opt_strs+1491)
-#define X509FMTDER_name      (gnutls_serv_opt_strs+1502)
+#define X509FMTDER_DESC      (gnutls_serv_opt_strs+1494)
+#define X509FMTDER_NAME      (gnutls_serv_opt_strs+1539)
+#define X509FMTDER_name      (gnutls_serv_opt_strs+1550)
 #define X509FMTDER_FLAGS     (OPTST_DISABLED)
 
 /*
  *  priority option description:
  */
-#define PRIORITY_DESC      (gnutls_serv_opt_strs+1513)
-#define PRIORITY_NAME      (gnutls_serv_opt_strs+1531)
-#define PRIORITY_name      (gnutls_serv_opt_strs+1540)
+#define PRIORITY_DESC      (gnutls_serv_opt_strs+1561)
+#define PRIORITY_NAME      (gnutls_serv_opt_strs+1579)
+#define PRIORITY_name      (gnutls_serv_opt_strs+1588)
 #define PRIORITY_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  dhparams option description:
  */
-#define DHPARAMS_DESC      (gnutls_serv_opt_strs+1549)
-#define DHPARAMS_NAME      (gnutls_serv_opt_strs+1571)
-#define DHPARAMS_name      (gnutls_serv_opt_strs+1580)
+#define DHPARAMS_DESC      (gnutls_serv_opt_strs+1597)
+#define DHPARAMS_NAME      (gnutls_serv_opt_strs+1619)
+#define DHPARAMS_name      (gnutls_serv_opt_strs+1628)
 #define DHPARAMS_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  x509cafile option description:
  */
-#define X509CAFILE_DESC      (gnutls_serv_opt_strs+1589)
-#define X509CAFILE_NAME      (gnutls_serv_opt_strs+1629)
-#define X509CAFILE_name      (gnutls_serv_opt_strs+1640)
+#define X509CAFILE_DESC      (gnutls_serv_opt_strs+1637)
+#define X509CAFILE_NAME      (gnutls_serv_opt_strs+1677)
+#define X509CAFILE_name      (gnutls_serv_opt_strs+1688)
 #define X509CAFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509crlfile option description:
  */
-#define X509CRLFILE_DESC      (gnutls_serv_opt_strs+1651)
-#define X509CRLFILE_NAME      (gnutls_serv_opt_strs+1667)
-#define X509CRLFILE_name      (gnutls_serv_opt_strs+1679)
+#define X509CRLFILE_DESC      (gnutls_serv_opt_strs+1699)
+#define X509CRLFILE_NAME      (gnutls_serv_opt_strs+1715)
+#define X509CRLFILE_name      (gnutls_serv_opt_strs+1727)
 #define X509CRLFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpkeyfile option description:
  */
-#define PGPKEYFILE_DESC      (gnutls_serv_opt_strs+1691)
-#define PGPKEYFILE_NAME      (gnutls_serv_opt_strs+1711)
-#define PGPKEYFILE_name      (gnutls_serv_opt_strs+1722)
+#define PGPKEYFILE_DESC      (gnutls_serv_opt_strs+1739)
+#define PGPKEYFILE_NAME      (gnutls_serv_opt_strs+1759)
+#define PGPKEYFILE_name      (gnutls_serv_opt_strs+1770)
 #define PGPKEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpkeyring option description:
  */
-#define PGPKEYRING_DESC      (gnutls_serv_opt_strs+1733)
-#define PGPKEYRING_NAME      (gnutls_serv_opt_strs+1758)
-#define PGPKEYRING_name      (gnutls_serv_opt_strs+1769)
+#define PGPKEYRING_DESC      (gnutls_serv_opt_strs+1781)
+#define PGPKEYRING_NAME      (gnutls_serv_opt_strs+1806)
+#define PGPKEYRING_name      (gnutls_serv_opt_strs+1817)
 #define PGPKEYRING_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pgpcertfile option description:
  */
-#define PGPCERTFILE_DESC      (gnutls_serv_opt_strs+1780)
-#define PGPCERTFILE_NAME      (gnutls_serv_opt_strs+1821)
-#define PGPCERTFILE_name      (gnutls_serv_opt_strs+1833)
+#define PGPCERTFILE_DESC      (gnutls_serv_opt_strs+1828)
+#define PGPCERTFILE_NAME      (gnutls_serv_opt_strs+1869)
+#define PGPCERTFILE_name      (gnutls_serv_opt_strs+1881)
 #define PGPCERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  x509keyfile option description:
  */
-#define X509KEYFILE_DESC      (gnutls_serv_opt_strs+1845)
-#define X509KEYFILE_NAME      (gnutls_serv_opt_strs+1883)
-#define X509KEYFILE_name      (gnutls_serv_opt_strs+1895)
+#define X509KEYFILE_DESC      (gnutls_serv_opt_strs+1893)
+#define X509KEYFILE_NAME      (gnutls_serv_opt_strs+1931)
+#define X509KEYFILE_name      (gnutls_serv_opt_strs+1943)
 #define X509KEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509certfile option description:
  */
-#define X509CERTFILE_DESC      (gnutls_serv_opt_strs+1907)
-#define X509CERTFILE_NAME      (gnutls_serv_opt_strs+1953)
-#define X509CERTFILE_name      (gnutls_serv_opt_strs+1966)
+#define X509CERTFILE_DESC      (gnutls_serv_opt_strs+1955)
+#define X509CERTFILE_NAME      (gnutls_serv_opt_strs+2001)
+#define X509CERTFILE_name      (gnutls_serv_opt_strs+2014)
 #define X509CERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509dsakeyfile option description:
  */
-#define X509DSAKEYFILE_DESC      (gnutls_serv_opt_strs+1979)
-#define X509DSAKEYFILE_NAME      (gnutls_serv_opt_strs+2029)
-#define X509DSAKEYFILE_name      (gnutls_serv_opt_strs+2044)
+#define X509DSAKEYFILE_DESC      (gnutls_serv_opt_strs+2027)
+#define X509DSAKEYFILE_NAME      (gnutls_serv_opt_strs+2077)
+#define X509DSAKEYFILE_name      (gnutls_serv_opt_strs+2092)
 #define X509DSAKEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509dsacertfile option description:
  */
-#define X509DSACERTFILE_DESC      (gnutls_serv_opt_strs+2059)
-#define X509DSACERTFILE_NAME      (gnutls_serv_opt_strs+2117)
-#define X509DSACERTFILE_name      (gnutls_serv_opt_strs+2133)
+#define X509DSACERTFILE_DESC      (gnutls_serv_opt_strs+2107)
+#define X509DSACERTFILE_NAME      (gnutls_serv_opt_strs+2165)
+#define X509DSACERTFILE_name      (gnutls_serv_opt_strs+2181)
 #define X509DSACERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509ecckeyfile option description:
  */
-#define X509ECCKEYFILE_DESC      (gnutls_serv_opt_strs+1979)
-#define X509ECCKEYFILE_NAME      (gnutls_serv_opt_strs+2149)
-#define X509ECCKEYFILE_name      (gnutls_serv_opt_strs+2164)
+#define X509ECCKEYFILE_DESC      (gnutls_serv_opt_strs+2027)
+#define X509ECCKEYFILE_NAME      (gnutls_serv_opt_strs+2197)
+#define X509ECCKEYFILE_name      (gnutls_serv_opt_strs+2212)
 #define X509ECCKEYFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  x509ecccertfile option description:
  */
-#define X509ECCCERTFILE_DESC      (gnutls_serv_opt_strs+2059)
-#define X509ECCCERTFILE_NAME      (gnutls_serv_opt_strs+2179)
-#define X509ECCCERTFILE_name      (gnutls_serv_opt_strs+2195)
+#define X509ECCCERTFILE_DESC      (gnutls_serv_opt_strs+2107)
+#define X509ECCCERTFILE_NAME      (gnutls_serv_opt_strs+2227)
+#define X509ECCCERTFILE_name      (gnutls_serv_opt_strs+2243)
 #define X509ECCCERTFILE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  pgpsubkey option description:
  */
-#define PGPSUBKEY_DESC      (gnutls_serv_opt_strs+2211)
-#define PGPSUBKEY_NAME      (gnutls_serv_opt_strs+2243)
-#define PGPSUBKEY_name      (gnutls_serv_opt_strs+2253)
+#define PGPSUBKEY_DESC      (gnutls_serv_opt_strs+2259)
+#define PGPSUBKEY_NAME      (gnutls_serv_opt_strs+2291)
+#define PGPSUBKEY_name      (gnutls_serv_opt_strs+2301)
 #define PGPSUBKEY_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  srppasswd option description:
  */
-#define SRPPASSWD_DESC      (gnutls_serv_opt_strs+2263)
-#define SRPPASSWD_NAME      (gnutls_serv_opt_strs+2288)
-#define SRPPASSWD_name      (gnutls_serv_opt_strs+2298)
+#define SRPPASSWD_DESC      (gnutls_serv_opt_strs+2311)
+#define SRPPASSWD_NAME      (gnutls_serv_opt_strs+2336)
+#define SRPPASSWD_name      (gnutls_serv_opt_strs+2346)
 #define SRPPASSWD_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  srppasswdconf option description:
  */
-#define SRPPASSWDCONF_DESC      (gnutls_serv_opt_strs+2308)
-#define SRPPASSWDCONF_NAME      (gnutls_serv_opt_strs+2347)
-#define SRPPASSWDCONF_name      (gnutls_serv_opt_strs+2361)
+#define SRPPASSWDCONF_DESC      (gnutls_serv_opt_strs+2356)
+#define SRPPASSWDCONF_NAME      (gnutls_serv_opt_strs+2395)
+#define SRPPASSWDCONF_name      (gnutls_serv_opt_strs+2409)
 #define SRPPASSWDCONF_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pskpasswd option description:
  */
-#define PSKPASSWD_DESC      (gnutls_serv_opt_strs+2375)
-#define PSKPASSWD_NAME      (gnutls_serv_opt_strs+2400)
-#define PSKPASSWD_name      (gnutls_serv_opt_strs+2410)
+#define PSKPASSWD_DESC      (gnutls_serv_opt_strs+2423)
+#define PSKPASSWD_NAME      (gnutls_serv_opt_strs+2448)
+#define PSKPASSWD_name      (gnutls_serv_opt_strs+2458)
 #define PSKPASSWD_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  pskhint option description:
  */
-#define PSKHINT_DESC      (gnutls_serv_opt_strs+2420)
-#define PSKHINT_NAME      (gnutls_serv_opt_strs+2445)
-#define PSKHINT_name      (gnutls_serv_opt_strs+2453)
+#define PSKHINT_DESC      (gnutls_serv_opt_strs+2468)
+#define PSKHINT_NAME      (gnutls_serv_opt_strs+2493)
+#define PSKHINT_name      (gnutls_serv_opt_strs+2501)
 #define PSKHINT_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
 
 /*
  *  ocsp-response option description:
  */
-#define OCSP_RESPONSE_DESC      (gnutls_serv_opt_strs+2461)
-#define OCSP_RESPONSE_NAME      (gnutls_serv_opt_strs+2497)
-#define OCSP_RESPONSE_name      (gnutls_serv_opt_strs+2511)
+#define OCSP_RESPONSE_DESC      (gnutls_serv_opt_strs+2509)
+#define OCSP_RESPONSE_NAME      (gnutls_serv_opt_strs+2545)
+#define OCSP_RESPONSE_name      (gnutls_serv_opt_strs+2559)
 #define OCSP_RESPONSE_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
 
 /*
  *  port option description:
  */
-#define PORT_DESC      (gnutls_serv_opt_strs+2525)
-#define PORT_NAME      (gnutls_serv_opt_strs+2548)
-#define PORT_name      (gnutls_serv_opt_strs+2553)
+#define PORT_DESC      (gnutls_serv_opt_strs+2573)
+#define PORT_NAME      (gnutls_serv_opt_strs+2596)
+#define PORT_name      (gnutls_serv_opt_strs+2601)
 #define PORT_FLAGS     (OPTST_DISABLED \
         | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
 
 /*
  *  list option description:
  */
-#define LIST_DESC      (gnutls_serv_opt_strs+2558)
-#define LIST_NAME      (gnutls_serv_opt_strs+2609)
-#define LIST_name      (gnutls_serv_opt_strs+2614)
+#define LIST_DESC      (gnutls_serv_opt_strs+2606)
+#define LIST_NAME      (gnutls_serv_opt_strs+2657)
+#define LIST_name      (gnutls_serv_opt_strs+2662)
 #define LIST_FLAGS     (OPTST_DISABLED)
 
 /*
  *  Help/More_Help/Version option descriptions:
  */
-#define HELP_DESC       (gnutls_serv_opt_strs+2619)
-#define HELP_name       (gnutls_serv_opt_strs+2663)
+#define HELP_DESC       (gnutls_serv_opt_strs+2667)
+#define HELP_name       (gnutls_serv_opt_strs+2711)
 #ifdef HAVE_WORKING_FORK
-#define MORE_HELP_DESC  (gnutls_serv_opt_strs+2668)
-#define MORE_HELP_name  (gnutls_serv_opt_strs+2713)
+#define MORE_HELP_DESC  (gnutls_serv_opt_strs+2716)
+#define MORE_HELP_name  (gnutls_serv_opt_strs+2761)
 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
 #else
 #define MORE_HELP_DESC  NULL
@@ -515,8 +527,8 @@ static char const gnutls_serv_opt_strs[3058] =
 #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
 #endif
-#define VER_DESC        (gnutls_serv_opt_strs+2723)
-#define VER_name        (gnutls_serv_opt_strs+2759)
+#define VER_DESC        (gnutls_serv_opt_strs+2771)
+#define VER_name        (gnutls_serv_opt_strs+2807)
 /*
  *  Declare option callback procedures
  */
@@ -647,8 +659,20 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ MTU_DESC, MTU_NAME, MTU_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 9, VALUE_OPT_DISABLE_CLIENT_CERT,
-     /* equiv idx, value */ 9, VALUE_OPT_DISABLE_CLIENT_CERT,
+  {  /* entry idx, value */ 9, VALUE_OPT_SRTP_PROFILES,
+     /* equiv idx, value */ 9, VALUE_OPT_SRTP_PROFILES,
+     /* equivalenced to  */ NO_EQUIVALENT,
+     /* min, max, act ct */ 0, 1, 0,
+     /* opt state flags  */ SRTP_PROFILES_FLAGS, 0,
+     /* last opt argumnt */ { NULL }, /* --srtp_profiles */
+     /* arg list/cookie  */ NULL,
+     /* must/cannot opts */ NULL, NULL,
+     /* option proc      */ NULL,
+     /* desc, NAME, name */ SRTP_PROFILES_DESC, SRTP_PROFILES_NAME, 
SRTP_PROFILES_name,
+     /* disablement strs */ NULL, NULL },
+
+  {  /* entry idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT,
+     /* equiv idx, value */ 10, VALUE_OPT_DISABLE_CLIENT_CERT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ DISABLE_CLIENT_CERT_FLAGS, 0,
@@ -659,8 +683,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ DISABLE_CLIENT_CERT_DESC, 
DISABLE_CLIENT_CERT_NAME, DISABLE_CLIENT_CERT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 10, VALUE_OPT_REQUIRE_CLIENT_CERT,
-     /* equiv idx, value */ 10, VALUE_OPT_REQUIRE_CLIENT_CERT,
+  {  /* entry idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT,
+     /* equiv idx, value */ 11, VALUE_OPT_REQUIRE_CLIENT_CERT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ REQUIRE_CLIENT_CERT_FLAGS, 0,
@@ -671,8 +695,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ REQUIRE_CLIENT_CERT_DESC, 
REQUIRE_CLIENT_CERT_NAME, REQUIRE_CLIENT_CERT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 11, VALUE_OPT_HEARTBEAT,
-     /* equiv idx, value */ 11, VALUE_OPT_HEARTBEAT,
+  {  /* entry idx, value */ 12, VALUE_OPT_HEARTBEAT,
+     /* equiv idx, value */ 12, VALUE_OPT_HEARTBEAT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ HEARTBEAT_FLAGS, 0,
@@ -683,8 +707,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ HEARTBEAT_DESC, HEARTBEAT_NAME, HEARTBEAT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 12, VALUE_OPT_X509FMTDER,
-     /* equiv idx, value */ 12, VALUE_OPT_X509FMTDER,
+  {  /* entry idx, value */ 13, VALUE_OPT_X509FMTDER,
+     /* equiv idx, value */ 13, VALUE_OPT_X509FMTDER,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509FMTDER_FLAGS, 0,
@@ -695,8 +719,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509FMTDER_DESC, X509FMTDER_NAME, X509FMTDER_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 13, VALUE_OPT_PRIORITY,
-     /* equiv idx, value */ 13, VALUE_OPT_PRIORITY,
+  {  /* entry idx, value */ 14, VALUE_OPT_PRIORITY,
+     /* equiv idx, value */ 14, VALUE_OPT_PRIORITY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PRIORITY_FLAGS, 0,
@@ -707,8 +731,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PRIORITY_DESC, PRIORITY_NAME, PRIORITY_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 14, VALUE_OPT_DHPARAMS,
-     /* equiv idx, value */ 14, VALUE_OPT_DHPARAMS,
+  {  /* entry idx, value */ 15, VALUE_OPT_DHPARAMS,
+     /* equiv idx, value */ 15, VALUE_OPT_DHPARAMS,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ DHPARAMS_FLAGS, 0,
@@ -719,8 +743,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ DHPARAMS_DESC, DHPARAMS_NAME, DHPARAMS_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 15, VALUE_OPT_X509CAFILE,
-     /* equiv idx, value */ 15, VALUE_OPT_X509CAFILE,
+  {  /* entry idx, value */ 16, VALUE_OPT_X509CAFILE,
+     /* equiv idx, value */ 16, VALUE_OPT_X509CAFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CAFILE_FLAGS, 0,
@@ -731,8 +755,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CAFILE_DESC, X509CAFILE_NAME, X509CAFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 16, VALUE_OPT_X509CRLFILE,
-     /* equiv idx, value */ 16, VALUE_OPT_X509CRLFILE,
+  {  /* entry idx, value */ 17, VALUE_OPT_X509CRLFILE,
+     /* equiv idx, value */ 17, VALUE_OPT_X509CRLFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CRLFILE_FLAGS, 0,
@@ -743,8 +767,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CRLFILE_DESC, X509CRLFILE_NAME, 
X509CRLFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 17, VALUE_OPT_PGPKEYFILE,
-     /* equiv idx, value */ 17, VALUE_OPT_PGPKEYFILE,
+  {  /* entry idx, value */ 18, VALUE_OPT_PGPKEYFILE,
+     /* equiv idx, value */ 18, VALUE_OPT_PGPKEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPKEYFILE_FLAGS, 0,
@@ -755,8 +779,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPKEYFILE_DESC, PGPKEYFILE_NAME, PGPKEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 18, VALUE_OPT_PGPKEYRING,
-     /* equiv idx, value */ 18, VALUE_OPT_PGPKEYRING,
+  {  /* entry idx, value */ 19, VALUE_OPT_PGPKEYRING,
+     /* equiv idx, value */ 19, VALUE_OPT_PGPKEYRING,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPKEYRING_FLAGS, 0,
@@ -767,8 +791,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPKEYRING_DESC, PGPKEYRING_NAME, PGPKEYRING_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 19, VALUE_OPT_PGPCERTFILE,
-     /* equiv idx, value */ 19, VALUE_OPT_PGPCERTFILE,
+  {  /* entry idx, value */ 20, VALUE_OPT_PGPCERTFILE,
+     /* equiv idx, value */ 20, VALUE_OPT_PGPCERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPCERTFILE_FLAGS, 0,
@@ -779,8 +803,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPCERTFILE_DESC, PGPCERTFILE_NAME, 
PGPCERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 20, VALUE_OPT_X509KEYFILE,
-     /* equiv idx, value */ 20, VALUE_OPT_X509KEYFILE,
+  {  /* entry idx, value */ 21, VALUE_OPT_X509KEYFILE,
+     /* equiv idx, value */ 21, VALUE_OPT_X509KEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509KEYFILE_FLAGS, 0,
@@ -791,8 +815,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509KEYFILE_DESC, X509KEYFILE_NAME, 
X509KEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 21, VALUE_OPT_X509CERTFILE,
-     /* equiv idx, value */ 21, VALUE_OPT_X509CERTFILE,
+  {  /* entry idx, value */ 22, VALUE_OPT_X509CERTFILE,
+     /* equiv idx, value */ 22, VALUE_OPT_X509CERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509CERTFILE_FLAGS, 0,
@@ -803,8 +827,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509CERTFILE_DESC, X509CERTFILE_NAME, 
X509CERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 22, VALUE_OPT_X509DSAKEYFILE,
-     /* equiv idx, value */ 22, VALUE_OPT_X509DSAKEYFILE,
+  {  /* entry idx, value */ 23, VALUE_OPT_X509DSAKEYFILE,
+     /* equiv idx, value */ 23, VALUE_OPT_X509DSAKEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509DSAKEYFILE_FLAGS, 0,
@@ -815,8 +839,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509DSAKEYFILE_DESC, X509DSAKEYFILE_NAME, 
X509DSAKEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 23, VALUE_OPT_X509DSACERTFILE,
-     /* equiv idx, value */ 23, VALUE_OPT_X509DSACERTFILE,
+  {  /* entry idx, value */ 24, VALUE_OPT_X509DSACERTFILE,
+     /* equiv idx, value */ 24, VALUE_OPT_X509DSACERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509DSACERTFILE_FLAGS, 0,
@@ -827,8 +851,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509DSACERTFILE_DESC, X509DSACERTFILE_NAME, 
X509DSACERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 24, VALUE_OPT_X509ECCKEYFILE,
-     /* equiv idx, value */ 24, VALUE_OPT_X509ECCKEYFILE,
+  {  /* entry idx, value */ 25, VALUE_OPT_X509ECCKEYFILE,
+     /* equiv idx, value */ 25, VALUE_OPT_X509ECCKEYFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509ECCKEYFILE_FLAGS, 0,
@@ -839,8 +863,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509ECCKEYFILE_DESC, X509ECCKEYFILE_NAME, 
X509ECCKEYFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 25, VALUE_OPT_X509ECCCERTFILE,
-     /* equiv idx, value */ 25, VALUE_OPT_X509ECCCERTFILE,
+  {  /* entry idx, value */ 26, VALUE_OPT_X509ECCCERTFILE,
+     /* equiv idx, value */ 26, VALUE_OPT_X509ECCCERTFILE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ X509ECCCERTFILE_FLAGS, 0,
@@ -851,8 +875,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ X509ECCCERTFILE_DESC, X509ECCCERTFILE_NAME, 
X509ECCCERTFILE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 26, VALUE_OPT_PGPSUBKEY,
-     /* equiv idx, value */ 26, VALUE_OPT_PGPSUBKEY,
+  {  /* entry idx, value */ 27, VALUE_OPT_PGPSUBKEY,
+     /* equiv idx, value */ 27, VALUE_OPT_PGPSUBKEY,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PGPSUBKEY_FLAGS, 0,
@@ -863,8 +887,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PGPSUBKEY_DESC, PGPSUBKEY_NAME, PGPSUBKEY_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 27, VALUE_OPT_SRPPASSWD,
-     /* equiv idx, value */ 27, VALUE_OPT_SRPPASSWD,
+  {  /* entry idx, value */ 28, VALUE_OPT_SRPPASSWD,
+     /* equiv idx, value */ 28, VALUE_OPT_SRPPASSWD,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SRPPASSWD_FLAGS, 0,
@@ -875,8 +899,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ SRPPASSWD_DESC, SRPPASSWD_NAME, SRPPASSWD_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 28, VALUE_OPT_SRPPASSWDCONF,
-     /* equiv idx, value */ 28, VALUE_OPT_SRPPASSWDCONF,
+  {  /* entry idx, value */ 29, VALUE_OPT_SRPPASSWDCONF,
+     /* equiv idx, value */ 29, VALUE_OPT_SRPPASSWDCONF,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ SRPPASSWDCONF_FLAGS, 0,
@@ -887,8 +911,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ SRPPASSWDCONF_DESC, SRPPASSWDCONF_NAME, 
SRPPASSWDCONF_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 29, VALUE_OPT_PSKPASSWD,
-     /* equiv idx, value */ 29, VALUE_OPT_PSKPASSWD,
+  {  /* entry idx, value */ 30, VALUE_OPT_PSKPASSWD,
+     /* equiv idx, value */ 30, VALUE_OPT_PSKPASSWD,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PSKPASSWD_FLAGS, 0,
@@ -899,8 +923,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PSKPASSWD_DESC, PSKPASSWD_NAME, PSKPASSWD_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 30, VALUE_OPT_PSKHINT,
-     /* equiv idx, value */ 30, VALUE_OPT_PSKHINT,
+  {  /* entry idx, value */ 31, VALUE_OPT_PSKHINT,
+     /* equiv idx, value */ 31, VALUE_OPT_PSKHINT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PSKHINT_FLAGS, 0,
@@ -911,8 +935,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PSKHINT_DESC, PSKHINT_NAME, PSKHINT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 31, VALUE_OPT_OCSP_RESPONSE,
-     /* equiv idx, value */ 31, VALUE_OPT_OCSP_RESPONSE,
+  {  /* entry idx, value */ 32, VALUE_OPT_OCSP_RESPONSE,
+     /* equiv idx, value */ 32, VALUE_OPT_OCSP_RESPONSE,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ OCSP_RESPONSE_FLAGS, 0,
@@ -923,8 +947,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ OCSP_RESPONSE_DESC, OCSP_RESPONSE_NAME, 
OCSP_RESPONSE_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 32, VALUE_OPT_PORT,
-     /* equiv idx, value */ 32, VALUE_OPT_PORT,
+  {  /* entry idx, value */ 33, VALUE_OPT_PORT,
+     /* equiv idx, value */ 33, VALUE_OPT_PORT,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ PORT_FLAGS, 0,
@@ -935,8 +959,8 @@ static tOptDesc optDesc[OPTION_CT] = {
      /* desc, NAME, name */ PORT_DESC, PORT_NAME, PORT_name,
      /* disablement strs */ NULL, NULL },
 
-  {  /* entry idx, value */ 33, VALUE_OPT_LIST,
-     /* equiv idx, value */ 33, VALUE_OPT_LIST,
+  {  /* entry idx, value */ 34, VALUE_OPT_LIST,
+     /* equiv idx, value */ 34, VALUE_OPT_LIST,
      /* equivalenced to  */ NO_EQUIVALENT,
      /* min, max, act ct */ 0, 1, 0,
      /* opt state flags  */ LIST_FLAGS, 0,
@@ -991,14 +1015,14 @@ static tOptDesc optDesc[OPTION_CT] = {
  *
  *  Define the gnutls-serv Option Environment
  */
-#define zPROGNAME       (gnutls_serv_opt_strs+2767)
-#define zUsageTitle     (gnutls_serv_opt_strs+2779)
+#define zPROGNAME       (gnutls_serv_opt_strs+2815)
+#define zUsageTitle     (gnutls_serv_opt_strs+2827)
 #define zRcName         NULL
 #define apzHomeList     NULL
-#define zBugsAddr       (gnutls_serv_opt_strs+2882)
-#define zExplain        (gnutls_serv_opt_strs+2901)
-#define zDetail         (gnutls_serv_opt_strs+2904)
-#define zFullVersion    (gnutls_serv_opt_strs+2963)
+#define zBugsAddr       (gnutls_serv_opt_strs+2930)
+#define zExplain        (gnutls_serv_opt_strs+2949)
+#define zDetail         (gnutls_serv_opt_strs+2952)
+#define zFullVersion    (gnutls_serv_opt_strs+3011)
 /* extracted from optcode.tlib near line 350 */
 
 #if defined(ENABLE_NLS)
@@ -1012,7 +1036,7 @@ static tOptDesc optDesc[OPTION_CT] = {
 
 #define gnutls_serv_full_usage (NULL)
 
-#define gnutls_serv_short_usage (gnutls_serv_opt_strs+2985)
+#define gnutls_serv_short_usage (gnutls_serv_opt_strs+3033)
 
 #endif /* not defined __doxygen__ */
 
@@ -1358,7 +1382,7 @@ tOptions gnutls_servOptions = {
       NO_EQUIVALENT, /* '-#' option index */
       NO_EQUIVALENT /* index of default opt */
     },
-    37 /* full option count */, 34 /* user option count */,
+    38 /* full option count */, 35 /* user option count */,
     gnutls_serv_full_usage, gnutls_serv_short_usage,
     NULL, NULL,
     PKGDATADIR, gnutls_serv_packager_info
diff --git a/src/serv-args.def b/src/serv-args.def
index df196ba..2132ca8 100644
--- a/src/serv-args.def
+++ b/src/serv-args.def
@@ -62,6 +62,13 @@ flag = {
 };
 
 flag = {
+    name      = srtp_profiles;
+    arg-type  = string;
+    descrip   = "Offer SRTP profiles";
+    doc       = "";
+};
+
+flag = {
     name      = disable-client-cert;
     value     = a;
     descrip   = "Do not request a client certificate";
diff --git a/src/serv-args.h b/src/serv-args.h
index 8ff5e1e..63e7ff8 100644
--- a/src/serv-args.h
+++ b/src/serv-args.h
@@ -2,7 +2,7 @@
  *  
  *  DO NOT EDIT THIS FILE   (serv-args.h)
  *  
- *  It has been AutoGen-ed  September 30, 2012 at 03:29:31 PM by AutoGen 5.16
+ *  It has been AutoGen-ed  November  1, 2012 at 03:36:17 PM by AutoGen 5.16
  *  From the definitions    serv-args.def
  *  and the template file   options
  *
@@ -76,37 +76,38 @@ typedef enum {
     INDEX_OPT_ECHO                 =  6,
     INDEX_OPT_UDP                  =  7,
     INDEX_OPT_MTU                  =  8,
-    INDEX_OPT_DISABLE_CLIENT_CERT  =  9,
-    INDEX_OPT_REQUIRE_CLIENT_CERT  = 10,
-    INDEX_OPT_HEARTBEAT            = 11,
-    INDEX_OPT_X509FMTDER           = 12,
-    INDEX_OPT_PRIORITY             = 13,
-    INDEX_OPT_DHPARAMS             = 14,
-    INDEX_OPT_X509CAFILE           = 15,
-    INDEX_OPT_X509CRLFILE          = 16,
-    INDEX_OPT_PGPKEYFILE           = 17,
-    INDEX_OPT_PGPKEYRING           = 18,
-    INDEX_OPT_PGPCERTFILE          = 19,
-    INDEX_OPT_X509KEYFILE          = 20,
-    INDEX_OPT_X509CERTFILE         = 21,
-    INDEX_OPT_X509DSAKEYFILE       = 22,
-    INDEX_OPT_X509DSACERTFILE      = 23,
-    INDEX_OPT_X509ECCKEYFILE       = 24,
-    INDEX_OPT_X509ECCCERTFILE      = 25,
-    INDEX_OPT_PGPSUBKEY            = 26,
-    INDEX_OPT_SRPPASSWD            = 27,
-    INDEX_OPT_SRPPASSWDCONF        = 28,
-    INDEX_OPT_PSKPASSWD            = 29,
-    INDEX_OPT_PSKHINT              = 30,
-    INDEX_OPT_OCSP_RESPONSE        = 31,
-    INDEX_OPT_PORT                 = 32,
-    INDEX_OPT_LIST                 = 33,
-    INDEX_OPT_VERSION              = 34,
-    INDEX_OPT_HELP                 = 35,
-    INDEX_OPT_MORE_HELP            = 36
+    INDEX_OPT_SRTP_PROFILES        =  9,
+    INDEX_OPT_DISABLE_CLIENT_CERT  = 10,
+    INDEX_OPT_REQUIRE_CLIENT_CERT  = 11,
+    INDEX_OPT_HEARTBEAT            = 12,
+    INDEX_OPT_X509FMTDER           = 13,
+    INDEX_OPT_PRIORITY             = 14,
+    INDEX_OPT_DHPARAMS             = 15,
+    INDEX_OPT_X509CAFILE           = 16,
+    INDEX_OPT_X509CRLFILE          = 17,
+    INDEX_OPT_PGPKEYFILE           = 18,
+    INDEX_OPT_PGPKEYRING           = 19,
+    INDEX_OPT_PGPCERTFILE          = 20,
+    INDEX_OPT_X509KEYFILE          = 21,
+    INDEX_OPT_X509CERTFILE         = 22,
+    INDEX_OPT_X509DSAKEYFILE       = 23,
+    INDEX_OPT_X509DSACERTFILE      = 24,
+    INDEX_OPT_X509ECCKEYFILE       = 25,
+    INDEX_OPT_X509ECCCERTFILE      = 26,
+    INDEX_OPT_PGPSUBKEY            = 27,
+    INDEX_OPT_SRPPASSWD            = 28,
+    INDEX_OPT_SRPPASSWDCONF        = 29,
+    INDEX_OPT_PSKPASSWD            = 30,
+    INDEX_OPT_PSKHINT              = 31,
+    INDEX_OPT_OCSP_RESPONSE        = 32,
+    INDEX_OPT_PORT                 = 33,
+    INDEX_OPT_LIST                 = 34,
+    INDEX_OPT_VERSION              = 35,
+    INDEX_OPT_HELP                 = 36,
+    INDEX_OPT_MORE_HELP            = 37
 } teOptIndex;
 
-#define OPTION_CT    37
+#define OPTION_CT    38
 #define GNUTLS_SERV_VERSION       "@VERSION@"
 #define GNUTLS_SERV_FULL_VERSION  "gnutls-serv @VERSION@"
 
@@ -157,29 +158,30 @@ typedef enum {
 #define VALUE_OPT_MTU            8
 
 #define OPT_VALUE_MTU            (DESC(MTU).optArg.argInt)
+#define VALUE_OPT_SRTP_PROFILES  9
 #define VALUE_OPT_DISABLE_CLIENT_CERT 'a'
 #define VALUE_OPT_REQUIRE_CLIENT_CERT 'r'
 #define VALUE_OPT_HEARTBEAT      'b'
-#define VALUE_OPT_X509FMTDER     12
-#define VALUE_OPT_PRIORITY       13
-#define VALUE_OPT_DHPARAMS       14
-#define VALUE_OPT_X509CAFILE     15
-#define VALUE_OPT_X509CRLFILE    16
-#define VALUE_OPT_PGPKEYFILE     17
-#define VALUE_OPT_PGPKEYRING     18
-#define VALUE_OPT_PGPCERTFILE    19
-#define VALUE_OPT_X509KEYFILE    20
-#define VALUE_OPT_X509CERTFILE   21
-#define VALUE_OPT_X509DSAKEYFILE 22
-#define VALUE_OPT_X509DSACERTFILE 23
-#define VALUE_OPT_X509ECCKEYFILE 24
-#define VALUE_OPT_X509ECCCERTFILE 25
-#define VALUE_OPT_PGPSUBKEY      26
-#define VALUE_OPT_SRPPASSWD      27
-#define VALUE_OPT_SRPPASSWDCONF  28
-#define VALUE_OPT_PSKPASSWD      29
-#define VALUE_OPT_PSKHINT        30
-#define VALUE_OPT_OCSP_RESPONSE  31
+#define VALUE_OPT_X509FMTDER     13
+#define VALUE_OPT_PRIORITY       14
+#define VALUE_OPT_DHPARAMS       15
+#define VALUE_OPT_X509CAFILE     16
+#define VALUE_OPT_X509CRLFILE    17
+#define VALUE_OPT_PGPKEYFILE     18
+#define VALUE_OPT_PGPKEYRING     19
+#define VALUE_OPT_PGPCERTFILE    20
+#define VALUE_OPT_X509KEYFILE    21
+#define VALUE_OPT_X509CERTFILE   22
+#define VALUE_OPT_X509DSAKEYFILE 23
+#define VALUE_OPT_X509DSACERTFILE 24
+#define VALUE_OPT_X509ECCKEYFILE 25
+#define VALUE_OPT_X509ECCCERTFILE 26
+#define VALUE_OPT_PGPSUBKEY      27
+#define VALUE_OPT_SRPPASSWD      28
+#define VALUE_OPT_SRPPASSWDCONF  29
+#define VALUE_OPT_PSKPASSWD      30
+#define VALUE_OPT_PSKHINT        31
+#define VALUE_OPT_OCSP_RESPONSE  32
 #define VALUE_OPT_PORT           'p'
 
 #define OPT_VALUE_PORT           (DESC(PORT).optArg.argInt)
diff --git a/src/serv.c b/src/serv.c
index 6be7a6d..db6b9e4 100644
--- a/src/serv.c
+++ b/src/serv.c
@@ -333,6 +333,7 @@ LIST_DECLARE_INIT (listener_list, listener_item, 
listener_free);
 gnutls_session_t initialize_session (int dtls)
 {
   gnutls_session_t session;
+  int ret;
   const char *err;
 
   if (priorities == NULL)
@@ -393,6 +394,15 @@ gnutls_session_t initialize_session (int dtls)
   if (HAVE_OPT (HEARTBEAT))
     gnutls_heartbeat_enable(session, GNUTLS_HB_PEER_ALLOWED_TO_SEND);
 
+  if (HAVE_OPT (SRTP_PROFILES))
+    {
+      ret = gnutls_srtp_set_profile_direct (session, OPT_ARG(SRTP_PROFILES), 
&err);
+      if (ret == GNUTLS_E_INVALID_REQUEST) fprintf (stderr, "Syntax error at: 
%s\n", err);
+      else 
+        fprintf(stderr, "Error in priorities: %s\n", gnutls_strerror(ret));
+      exit (1);
+    }
+
   return session;
 }
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d8307f7..3bc8f03 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -70,7 +70,8 @@ ctests = mini-deflate simple gc set_pkcs12_cred certder 
certuniqueid  \
         mini-loss-time mini-tdb mini-dtls-rehandshake mini-record \
         mini-termination mini-x509-cas mini-x509-2 pkcs12_simple \
         mini-emsgsize-dtls mini-handshake-timeout chainverify-unsorted \
-        mini-dtls-heartbeat mini-x509-callbacks key-openssl
+        mini-dtls-heartbeat mini-x509-callbacks key-openssl            \
+        mini-dtls-srtp
 
 if ENABLE_OCSP
 ctests += ocsp
diff --git a/tests/mini-dtls-heartbeat.c b/tests/mini-dtls-srtp.c
similarity index 67%
copy from tests/mini-dtls-heartbeat.c
copy to tests/mini-dtls-srtp.c
index ddda127..8f41d61 100644
--- a/tests/mini-dtls-heartbeat.c
+++ b/tests/mini-dtls-srtp.c
@@ -72,15 +72,11 @@ static pid_t child;
 /* A very basic DTLS client, with anonymous authentication, that exchanges 
heartbeats.
  */
 
-#define MAX_BUF 1024
-
-
 static void
-client (int fd, int server_init)
+client (int fd, int profile)
 {
     gnutls_session_t session;
-    int ret, ret2;
-    char buffer[MAX_BUF + 1];
+    int ret;
     gnutls_anon_client_credentials_t anoncred;
     /* Need to enable anonymous KX specifically. */
 
@@ -104,6 +100,18 @@ client (int fd, int server_init)
     gnutls_priority_set_direct (session,
                                 
"NONE:+VERS-DTLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL",
                                 NULL);
+    if (profile)
+      ret = gnutls_srtp_set_profile_direct(session, "SRTP_AES128_CM_SHA1_80",
+                                           NULL);
+    else
+      ret = gnutls_srtp_set_profile_direct(session, "SRTP_NULL_SHA1_80",
+                                           NULL);
+    if (ret < 0)
+      {
+        gnutls_perror(ret);
+        exit(1);
+      }
+    
 
     /* put the anonymous credentials to the current session
      */
@@ -136,48 +144,14 @@ client (int fd, int server_init)
                  gnutls_protocol_get_name (gnutls_protocol_get_version
                                            (session)));
 
-    if (!server_init)
-      {
-          do
-            {
-                ret =
-                    gnutls_record_recv (session, buffer, sizeof (buffer));
-
-                if (ret == GNUTLS_E_HEARTBEAT_PING_RECEIVED)
-                  {
-                      if (debug)
-                          success ("Ping received. Replying with pong.\n");
-                      ret2 = gnutls_heartbeat_pong (session, 0);
-                      if (ret2 < 0)
-                        {
-                            fail ("pong: %s\n", gnutls_strerror (ret));
-                            terminate ();
-                        }
-                  }
-            }
-          while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED
-                 || ret == GNUTLS_E_HEARTBEAT_PING_RECEIVED);
-      }
-    else
+/*
+    ret = gnutls_prf(session, sizeof("EXTRACTOR-dtls_srtp")-1, 
"EXTRACTOR-dtls_srtp", 0, ctx_len, ctx, 32, out);
+    if (ret < 0)
       {
-          do
-            {
-                ret =
-                    gnutls_heartbeat_ping (session, 256, 5,
-                                           GNUTLS_HEARTBEAT_WAIT);
-
-                if (debug)
-                  success ("Ping sent.\n");
-            }
-          while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED);
-
-          if (ret < 0)
-            {
-                fail ("ping: %s\n", gnutls_strerror (ret));
-                terminate ();
-            }
+        gnutls_perror(ret);
+        exit(1);
       }
-
+*/
     gnutls_bye (session, GNUTLS_SHUT_WR);
 
     close (fd);
@@ -189,27 +163,6 @@ client (int fd, int server_init)
     gnutls_global_deinit ();
 }
 
-
-
-static gnutls_session_t
-initialize_tls_session (void)
-{
-    gnutls_session_t session;
-
-    gnutls_init (&session, GNUTLS_SERVER | GNUTLS_DATAGRAM);
-    gnutls_heartbeat_enable (session, GNUTLS_HB_PEER_ALLOWED_TO_SEND);
-    gnutls_dtls_set_mtu (session, 1500);
-
-    /* avoid calling all the priority functions, since the defaults
-     * are adequate.
-     */
-    gnutls_priority_set_direct (session,
-                                
"NONE:+VERS-DTLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL",
-                                NULL);
-
-    return session;
-}
-
 static void
 terminate (void)
 {
@@ -221,10 +174,9 @@ terminate (void)
 }
 
 static void
-server (int fd, int server_init)
+server (int fd, int profile)
 {
-    int ret, ret2;
-    char buffer[MAX_BUF + 1];
+    int ret;
     gnutls_session_t session;
     gnutls_anon_server_credentials_t anoncred;
     /* this must be called once in the program
@@ -239,7 +191,29 @@ server (int fd, int server_init)
 
     gnutls_anon_allocate_server_credentials (&anoncred);
 
-    session = initialize_tls_session ();
+    gnutls_init (&session, GNUTLS_SERVER | GNUTLS_DATAGRAM);
+    gnutls_heartbeat_enable (session, GNUTLS_HB_PEER_ALLOWED_TO_SEND);
+    gnutls_dtls_set_mtu (session, 1500);
+
+    /* avoid calling all the priority functions, since the defaults
+     * are adequate.
+     */
+    gnutls_priority_set_direct (session,
+                                
"NONE:+VERS-DTLS1.0:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL",
+                                NULL);
+
+    if (profile)
+      ret = gnutls_srtp_set_profile_direct(session, "SRTP_AES128_CM_SHA1_80",
+                                           NULL);
+    else
+      ret = gnutls_srtp_set_profile_direct(session, "SRTP_NULL_SHA1_80",
+                                           NULL);
+    if (ret < 0)
+      {
+        gnutls_perror(ret);
+        exit(1);
+      }
+
     gnutls_credentials_set (session, GNUTLS_CRD_ANON, anoncred);
 
     gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) fd);
@@ -265,50 +239,14 @@ server (int fd, int server_init)
                  gnutls_protocol_get_name (gnutls_protocol_get_version
                                            (session)));
 
-    /* see the Getting peer's information example */
-    /* print_info(session); */
-
-    if (server_init)
-      {
-          do
-            {
-                ret =
-                    gnutls_record_recv (session, buffer, sizeof (buffer));
-
-                if (ret == GNUTLS_E_HEARTBEAT_PING_RECEIVED)
-                  {
-                      if (debug)
-                          success ("Ping received. Replying with pong.\n");
-                      ret2 = gnutls_heartbeat_pong (session, 0);
-                      if (ret2 < 0)
-                        {
-                            fail ("pong: %s\n", gnutls_strerror (ret));
-                            terminate ();
-                        }
-                  }
-            }
-          while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED
-                 || ret == GNUTLS_E_HEARTBEAT_PING_RECEIVED);
-      }
-    else
+/*
+    ret = gnutls_prf(session, sizeof("EXTRACTOR-dtls_srtp")-1, 
"EXTRACTOR-dtls_srtp", 0, ctx_len, ctx, 32, out);
+    if (ret < 0)
       {
-          do
-            {
-                ret =
-                    gnutls_heartbeat_ping (session, 256, 5,
-                                           GNUTLS_HEARTBEAT_WAIT);
-
-                if (debug)
-                  success ("Ping sent.\n");
-            }
-          while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED);
-
-          if (ret < 0)
-            {
-                fail ("ping: %s\n", gnutls_strerror (ret));
-                terminate ();
-            }
+        gnutls_perror(ret);
+        exit(1);
       }
+*/
 
     /* do not wait for the peer to close the connection.
      */
@@ -326,7 +264,7 @@ server (int fd, int server_init)
 }
 
 static void
-start (int server_initiated)
+start (int profile)
 {
     int fd[2];
     int ret;
@@ -351,7 +289,7 @@ start (int server_initiated)
           int status;
           /* parent */
 
-          server (fd[0], server_initiated);
+          server (fd[0], profile);
           wait (&status);
           if (WEXITSTATUS (status) != 0)
               fail ("Child died with status %d\n", WEXITSTATUS (status));
@@ -359,7 +297,7 @@ start (int server_initiated)
     else
       {
           close (fd[0]);
-          client (fd[1], server_initiated);
+          client (fd[1], profile);
           exit (0);
       }
 }


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]