API modified so server side can get mki value
+ client side discards self mki if server does not support it

Signed-off-by: Johan Pascal <johan.pascal@belledonne-communications.com>
diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index c70346a..d53a40a 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -2754,8 +2754,10 @@
     else if( opt.use_srtp != 0  )
     {
         size_t j = 0;
+        const mbedtls_dtls_srtp_info *dtls_srtp_negotiation_result =
+                        mbedtls_ssl_get_dtls_srtp_negotiation_result( &ssl );
 
-        if( ( mbedtls_ssl_get_dtls_srtp_protection_profile( &ssl )
+        if( ( dtls_srtp_negotiation_result->chosen_dtls_srtp_profile
                                 == MBEDTLS_TLS_SRTP_UNSET ) )
         {
             mbedtls_printf( "    Unable to negotiate "
@@ -2797,6 +2799,20 @@
                 mbedtls_printf( "%02X", dtls_srtp_key_material[j] );
             }
             mbedtls_printf( "\n" );
+
+            if ( dtls_srtp_negotiation_result->mki_len > 0 )
+            {
+                mbedtls_printf( "    DTLS-SRTP mki value: " );
+                for( j = 0; j < dtls_srtp_negotiation_result->mki_len; j++ )
+                {
+                    mbedtls_printf( "%02X", dtls_srtp_negotiation_result->mki_value[j] );
+                }
+            }
+            else
+            {
+                mbedtls_printf( "    DTLS-SRTP no mki value negociated" );
+            }
+            mbedtls_printf( "\n" );
         }
     }
 #endif /* MBEDTLS_SSL_DTLS_SRTP */
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index 97929cd..126a64c 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -3865,8 +3865,10 @@
     else if( opt.use_srtp != 0  )
     {
         size_t j = 0;
+        const mbedtls_dtls_srtp_info *dtls_srtp_negotiation_result =
+                        mbedtls_ssl_get_dtls_srtp_negotiation_result( &ssl );
 
-        if( ( mbedtls_ssl_get_dtls_srtp_protection_profile( &ssl )
+        if( ( dtls_srtp_negotiation_result->chosen_dtls_srtp_profile
                                 == MBEDTLS_TLS_SRTP_UNSET ) )
         {
             mbedtls_printf( "    Unable to negotiate "
@@ -3908,6 +3910,21 @@
                 mbedtls_printf( "%02X", dtls_srtp_key_material[j] );
             }
             mbedtls_printf( "\n" );
+
+            if ( dtls_srtp_negotiation_result->mki_len > 0 )
+            {
+                mbedtls_printf( "    DTLS-SRTP mki value: " );
+                for( j = 0; j < dtls_srtp_negotiation_result->mki_len; j++ )
+                {
+                    mbedtls_printf( "%02X", dtls_srtp_negotiation_result->mki_value[j] );
+                }
+            }
+            else
+            {
+                mbedtls_printf( "    DTLS-SRTP no mki value negociated" );
+            }
+            mbedtls_printf( "\n" );
+
         }
     }
 #endif /* MBEDTLS_SSL_DTLS_SRTP */