View | Details | Raw Unified | Return to bug 255084 | Differences between
and this patch

Collapse All | Expand All

(-)security/mbedtls/Makefile (-15 / +8 lines)
Lines 1-36 Link Here
1
PORTNAME=	mbedtls
1
PORTNAME=	mbedtls
2
PORTVERSION=	2.16.11
2
PORTVERSION=	2.27.0
3
DISTVERSIONPREFIX=${PORTNAME}-
3
DISTVERSIONPREFIX=	${PORTNAME}-
4
CATEGORIES=	security devel
4
CATEGORIES=	security devel
5
5
6
MAINTAINER=	tijl@FreeBSD.org
6
MAINTAINER=	tijl@FreeBSD.org
7
COMMENT=	SSL/TLS and cryptography library
7
COMMENT=	SSL/TLS and cryptography library
8
8
9
LICENSE=	APACHE20
9
LICENSE=	APACHE20
10
LICENSE_FILE=	${WRKSRC}/apache-2.0.txt
10
LICENSE_FILE=	${WRKSRC}/LICENSE
11
12
USES=		gmake python:build,test shebangfix tar:tgz
11
13
12
USE_GITHUB=	yes
14
USE_GITHUB=	yes
13
GH_ACCOUNT=	ARMmbed
15
GH_ACCOUNT=	ARMmbed
14
16
15
ALL_TARGET=	no_test
17
ALL_TARGET=	no_test
16
TEST_TARGET=	test
18
TEST_TARGET=	test
17
MAKE_ENV=	SHARED=1
19
MAKE_ENV=	PYTHON=${PYTHON_CMD} \
18
USES=		gmake tar:tgz
20
		SHARED=1
19
USE_LDCONFIG=	yes
21
USE_LDCONFIG=	yes
20
22
21
CONFLICTS_INSTALL=	polarssl13-[0-9]*
23
CONFLICTS_INSTALL=	polarssl13-[0-9]*
24
SHEBANG_FILES=		scripts/*.py tests/scripts/*.py
22
25
23
post-patch:
26
post-patch:
24
	@${RM} ${WRKSRC}/include/mbedtls/*.orig
25
	@${REINPLACE_CMD} \
26
		-e 's/PREFIX/NAMEPREFIX/' \
27
		-e 's/$$(DESTDIR)/&$$(PREFIX)/' \
28
		${WRKSRC}/Makefile
29
	@${REINPLACE_CMD} 's/-fpic//' ${WRKSRC}/library/Makefile
27
	@${REINPLACE_CMD} 's/-fpic//' ${WRKSRC}/library/Makefile
30
28
31
post-install:
32
	${FIND} ${STAGEDIR}${PREFIX}/bin -type f -not -name \
33
		mbedtls_udp_proxy_wrapper.sh -exec ${STRIP_CMD} {} +
34
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
35
36
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)security/mbedtls/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1626016938
1
TIMESTAMP = 1638725332
2
SHA256 (ARMmbed-mbedtls-mbedtls-2.16.11_GH0.tar.gz) = 51bb9685c4f4ff9255da5659ff346b89dcaf129e3ba0f3b2b0c48a1a7495e701
2
SHA256 (ARMmbed-mbedtls-mbedtls-2.27.0_GH0.tar.gz) = 4f6a43f06ded62aa20ef582436a39b65902e1126cbbe2fb17f394e9e9a552767
3
SIZE (ARMmbed-mbedtls-mbedtls-2.16.11_GH0.tar.gz) = 2692209
3
SIZE (ARMmbed-mbedtls-mbedtls-2.27.0_GH0.tar.gz) = 4212185
(-)security/mbedtls/files/patch-Makefile (+74 lines)
Added Link Here
1
--- Makefile.orig	2021-03-12 16:55:26 UTC
2
+++ Makefile
3
@@ -1,5 +1,8 @@
4
 DESTDIR=/usr/local
5
-PREFIX=mbedtls_
6
+NAMEPREFIX=mbedtls_
7
+INSTALL_DATA=install -m 444
8
+INSTALL_PROGRAM=install -s -m 555
9
+INSTALL_SCRIPT=install -m 555
10
 
11
 .SILENT:
12
 
13
@@ -24,37 +27,43 @@ mbedtls_test:
14
 
15
 ifndef WINDOWS
16
 install: no_test
17
-	mkdir -p $(DESTDIR)/include/mbedtls
18
-	cp -rp include/mbedtls $(DESTDIR)/include
19
-	mkdir -p $(DESTDIR)/include/psa
20
-	cp -rp include/psa $(DESTDIR)/include
21
+	mkdir -p $(DESTDIR)$(PREFIX)/include/mbedtls
22
+	${INSTALL_DATA} include/mbedtls/* $(DESTDIR)$(PREFIX)/include/mbedtls
23
+	mkdir -p $(DESTDIR)$(PREFIX)/include/psa
24
+	${INSTALL_DATA} include/psa/* $(DESTDIR)$(PREFIX)/include/psa
25
 
26
-	mkdir -p $(DESTDIR)/lib
27
-	cp -RP library/libmbedtls.*    $(DESTDIR)/lib
28
-	cp -RP library/libmbedx509.*   $(DESTDIR)/lib
29
-	cp -RP library/libmbedcrypto.* $(DESTDIR)/lib
30
+	mkdir -p $(DESTDIR)$(PREFIX)/lib
31
+	${INSTALL_PROGRAM} library/libmbedtls.*    $(DESTDIR)$(PREFIX)/lib
32
+	${INSTALL_PROGRAM} library/libmbedx509.*   $(DESTDIR)$(PREFIX)/lib
33
+	${INSTALL_PROGRAM} library/libmbedcrypto.* $(DESTDIR)$(PREFIX)/lib
34
 
35
-	mkdir -p $(DESTDIR)/bin
36
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
37
 	for p in programs/*/* ; do              \
38
 	    if [ -x $$p ] && [ ! -d $$p ] ;     \
39
 	    then                                \
40
-	        f=$(PREFIX)`basename $$p` ;     \
41
-	        cp $$p $(DESTDIR)/bin/$$f ;     \
42
+		f=$(NAMEPREFIX)`basename $$p` ;     \
43
+        	e=`echo $p | awk -F. '{print$2}'` ; \
44
+        	if [ x$e = xsh ] ;                  \
45
+		then \
46
+		    ${INSTALL_PROGRAM} $$p $(DESTDIR)$(PREFIX)/bin/$$f ;     \
47
+		else \
48
+		    ${INSTALL_SCRIPT} $$p $(DESTDIR)$(PREFIX)/bin/$$f ;     \
49
+		fi \
50
 	    fi                                  \
51
 	done
52
 
53
 uninstall:
54
-	rm -rf $(DESTDIR)/include/mbedtls
55
-	rm -rf $(DESTDIR)/include/psa
56
-	rm -f $(DESTDIR)/lib/libmbedtls.*
57
-	rm -f $(DESTDIR)/lib/libmbedx509.*
58
-	rm -f $(DESTDIR)/lib/libmbedcrypto.*
59
+	rm -rf $(DESTDIR)$(PREFIX)/include/mbedtls
60
+	rm -rf $(DESTDIR)$(PREFIX)/include/psa
61
+	rm -f $(DESTDIR)$(PREFIX)/lib/libmbedtls.*
62
+	rm -f $(DESTDIR)$(PREFIX)/lib/libmbedx509.*
63
+	rm -f $(DESTDIR)$(PREFIX)/lib/libmbedcrypto.*
64
 
65
 	for p in programs/*/* ; do              \
66
 	    if [ -x $$p ] && [ ! -d $$p ] ;     \
67
 	    then                                \
68
-	        f=$(PREFIX)`basename $$p` ;     \
69
-	        rm -f $(DESTDIR)/bin/$$f ;      \
70
+	        f=$(NAMEPREFIX)`basename $$p` ;     \
71
+	        rm -f $(DESTDIR)$(PREFIX)/bin/$$f ;      \
72
 	    fi                                  \
73
 	done
74
 endif
(-)security/mbedtls/files/patch-config.h (-20 lines)
Removed Link Here
1
--- include/mbedtls/config.h.orig	2017-03-08 15:33:04 UTC
2
+++ include/mbedtls/config.h
3
@@ -1285,7 +1285,7 @@
4
  *
5
  * Uncomment this to enable pthread mutexes.
6
  */
7
-//#define MBEDTLS_THREADING_PTHREAD
8
+#define MBEDTLS_THREADING_PTHREAD
9
 
10
 /**
11
  * \def MBEDTLS_VERSION_FEATURES
12
@@ -2322,7 +2322,7 @@
13
  *
14
  * Enable this layer to allow use of mutexes within mbed TLS
15
  */
16
-//#define MBEDTLS_THREADING_C
17
+#define MBEDTLS_THREADING_C
18
 
19
 /**
20
  * \def MBEDTLS_TIMING_C
(-)security/mbedtls/files/patch-dtls-srtp (-659 lines)
Removed Link Here
1
Add DTLS-SRTP (RFC 5764) support.
2
3
Obtained from:	git://git.linphone.org/linphone-desktop.git
4
5
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
6
index d1db0d8..72e2d04 100644
7
--- include/mbedtls/config.h
8
+++ include/mbedtls/config.h
9
@@ -1154,6 +1154,17 @@
10
 #define MBEDTLS_SSL_DTLS_HELLO_VERIFY
11
 
12
 /**
13
+ * \def MBEDTLS_SSL_DTLS_SRTP
14
+ *
15
+ * Enable support for DTLS-SRTP, RFC5764
16
+ *
17
+ * Requires: MBEDTLS_SSL_PROTO_DTLS
18
+ *
19
+ * Comment this to disable support for DTLS-SRTP.
20
+ */
21
+#define MBEDTLS_SSL_DTLS_SRTP
22
+
23
+/**
24
  * \def MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
25
  *
26
  * Enable server-side support for clients that reconnect from the same port.
27
diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h
28
index 00e1c6c..729e95f 100644
29
--- include/mbedtls/ssl.h
30
+++ include/mbedtls/ssl.h
31
@@ -326,6 +326,8 @@
32
 
33
 #define MBEDTLS_TLS_EXT_SIG_ALG                     13
34
 
35
+#define MBEDTLS_TLS_EXT_USE_SRTP                    14
36
+
37
 #define MBEDTLS_TLS_EXT_ALPN                        16
38
 
39
 #define MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC            22 /* 0x16 */
40
@@ -338,6 +340,14 @@
41
 #define MBEDTLS_TLS_EXT_RENEGOTIATION_INFO      0xFF01
42
 
43
 /*
44
+ * use_srtp extension protection profiles values as defined in http://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml
45
+ */
46
+#define MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE     0x0001
47
+#define MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE     0x0002
48
+#define MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE          0x0005
49
+#define MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE          0x0006
50
+
51
+/*
52
  * Size defines
53
  */
54
 #if !defined(MBEDTLS_PSK_MAX_LEN)
55
@@ -426,6 +436,19 @@ typedef struct mbedtls_ssl_key_cert mbedtls_ssl_key_cert;
56
 typedef struct mbedtls_ssl_flight_item mbedtls_ssl_flight_item;
57
 #endif
58
 
59
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
60
+/*
61
+ * List of SRTP profiles for DTLS-SRTP
62
+ */
63
+enum mbedtls_DTLS_SRTP_protection_profiles {
64
+    MBEDTLS_SRTP_UNSET_PROFILE,
65
+    MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80,
66
+    MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32,
67
+    MBEDTLS_SRTP_NULL_HMAC_SHA1_80,
68
+    MBEDTLS_SRTP_NULL_HMAC_SHA1_32,
69
+};
70
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
71
+
72
 /*
73
  * This structure is used for storing current session data.
74
  */
75
@@ -566,6 +589,14 @@ struct mbedtls_ssl_config
76
     const char **alpn_list;         /*!< ordered list of protocols          */
77
 #endif
78
 
79
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
80
+    /*
81
+     * use_srtp extension
82
+     */
83
+    enum mbedtls_DTLS_SRTP_protection_profiles *dtls_srtp_profiles_list; /*!< ordered list of supported srtp profile */
84
+    size_t dtls_srtp_profiles_list_len; /*!< number of supported profiles */
85
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
86
+
87
     /*
88
      * Numerical settings (int then char)
89
      */
90
@@ -765,6 +796,15 @@ struct mbedtls_ssl_context
91
     const char *alpn_chosen;    /*!<  negotiated protocol                   */
92
 #endif
93
 
94
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
95
+    /*
96
+     * use_srtp extension
97
+     */
98
+    enum mbedtls_DTLS_SRTP_protection_profiles chosen_dtls_srtp_profile; /*!< negotiated SRTP profile */
99
+    unsigned char *dtls_srtp_keys; /*<! master keys and master salt for SRTP generated during handshake */
100
+    size_t dtls_srtp_keys_len; /*<! length in bytes of master keys and master salt for SRTP generated during handshake */
101
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
102
+
103
     /*
104
      * Information for DTLS hello verify
105
      */
106
@@ -1781,6 +1821,45 @@ int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **prot
107
 const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl );
108
 #endif /* MBEDTLS_SSL_ALPN */
109
 
110
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
111
+/**
112
+ * \brief                   Set the supported DTLS-SRTP protection profiles.
113
+ *
114
+ * \param ssl               SSL configuration
115
+ * \param protos            List of supported protection profiles,
116
+ *                          in decreasing preference order.
117
+ * \param profiles_number   Number of supported profiles.
118
+ *
119
+ * \return         0 on success, or MBEDTLS_ERR_SSL_BAD_INPUT_DATA.
120
+ */
121
+int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf, const enum mbedtls_DTLS_SRTP_protection_profiles *profiles, size_t profiles_number);
122
+
123
+/**
124
+ * \brief          Get the negotiated DTLS-SRTP Protection Profile.
125
+ *                 This function should be called after the handshake is
126
+ *                 completed.
127
+ *
128
+ * \param ssl      SSL context
129
+ *
130
+ * \return         Protection Profile enum member, MBEDTLS_SRTP_UNSET_PROFILE if no protocol was negotiated.
131
+ */
132
+enum mbedtls_DTLS_SRTP_protection_profiles mbedtls_ssl_get_dtls_srtp_protection_profile( const mbedtls_ssl_context *ssl);
133
+
134
+/**
135
+ * \brief                  Get the generated DTLS-SRTP key material.
136
+ *                         This function should be called after the handshake is
137
+ *                         completed. It shall returns 80 bytes of key material generated according to RFC5764
138
+ *
139
+ * \param ssl              SSL context
140
+ * \param key              Buffer to hold the generated key material
141
+ * \param key_buffer_len   Length in bytes of the key buffer
142
+ * \param key_len          Actual length of data written in the key buffer
143
+ *
144
+ * \return         0 on succes, MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL if the key buffer is too small to hold the generated key
145
+ */
146
+int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, const size_t key_buffer_len, size_t *key_len );
147
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
148
+
149
 /**
150
  * \brief          Set the maximum supported version sent from the client side
151
  *                 and/or accepted at the server side
152
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
153
index 4452169..91569ed 100644
154
--- library/ssl_cli.c
155
+++ library/ssl_cli.c
156
@@ -656,6 +656,79 @@ static void ssl_write_alpn_ext( mbedtls_ssl_context *ssl,
157
 }
158
 #endif /* MBEDTLS_SSL_ALPN */
159
 
160
+#if defined (MBEDTLS_SSL_DTLS_SRTP)
161
+static void ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl,
162
+                                unsigned char *buf, size_t *olen )
163
+{
164
+    unsigned char *p = buf;
165
+    size_t protection_profiles_index = 0;
166
+
167
+    *olen = 0;
168
+
169
+    if( (ssl->conf->dtls_srtp_profiles_list == NULL)  || (ssl->conf->dtls_srtp_profiles_list_len == 0) )
170
+    {
171
+        return;
172
+    }
173
+
174
+    MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding use_srtp extension" ) );
175
+
176
+    *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_USE_SRTP >> 8 ) & 0xFF );
177
+    *p++ = (unsigned char)( ( MBEDTLS_TLS_EXT_USE_SRTP      ) & 0xFF );
178
+
179
+    /* RFC5764 section 4.1.1
180
+     * uint8 SRTPProtectionProfile[2];
181
+     *
182
+     * struct {
183
+     *   SRTPProtectionProfiles SRTPProtectionProfiles;
184
+     *   opaque srtp_mki<0..255>;
185
+     * } UseSRTPData;
186
+
187
+     * SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
188
+     *
189
+     * Note: srtp_mki is not supported
190
+     */
191
+
192
+    /* Extension length = 2bytes for profiles lenght, ssl->conf->dtls_srtp_profiles_list_len*2 (each profile is 2 bytes length ) + 1 byte for the non implemented srtp_mki vector length (always 0) */
193
+    *p++ = (unsigned char)( ( ( 2 + 2*(ssl->conf->dtls_srtp_profiles_list_len) + 1 ) >> 8 ) & 0xFF );
194
+    *p++ = (unsigned char)( ( ( 2 + 2*(ssl->conf->dtls_srtp_profiles_list_len) + 1 )      ) & 0xFF );
195
+
196
+
197
+    /* protection profile length: 2*(ssl->conf->dtls_srtp_profiles_list_len) */
198
+    *p++ = (unsigned char)( ( ( 2*(ssl->conf->dtls_srtp_profiles_list_len) ) >> 8 ) & 0xFF );
199
+    *p++ = (unsigned char)( ( 2*(ssl->conf->dtls_srtp_profiles_list_len) ) & 0xFF );
200
+
201
+    for( protection_profiles_index=0; protection_profiles_index < ssl->conf->dtls_srtp_profiles_list_len; protection_profiles_index++ )
202
+    {
203
+        switch (ssl->conf->dtls_srtp_profiles_list[protection_profiles_index]) {
204
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80:
205
+                *p++ = ( ( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE ) >> 8 ) & 0xFF);
206
+                *p++ = ( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE ) & 0xFF);
207
+                break;
208
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32:
209
+                *p++ = ( ( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE ) >> 8 ) & 0xFF);
210
+                *p++ = ( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE ) & 0xFF);
211
+                break;
212
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_80:
213
+                *p++ = ( ( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE ) >> 8 ) & 0xFF);
214
+                *p++ = ( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE ) & 0xFF);
215
+                break;
216
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_32:
217
+                *p++ = ( ( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE ) >> 8 ) & 0xFF);
218
+                *p++ = ( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE ) & 0xFF);
219
+                break;
220
+            default:
221
+                /* Note: we shall never arrive here as protection profiles is checked by ssl_set_dtls_srtp_protection_profiles function */
222
+                MBEDTLS_SSL_DEBUG_MSG( 1, ( "client hello, ignore illegal DTLS-SRTP protection profile %d",  ssl->conf->dtls_srtp_profiles_list[protection_profiles_index]) );
223
+                break;
224
+        }
225
+    }
226
+
227
+    *p++ = 0x00;  /* non implemented srtp_mki vector length is always 0 */
228
+    /* total extension length: extension type (2 bytes) + extension length (2 bytes) + protection profile length (2 bytes) + 2*nb protection profiles + srtp_mki vector length(1 byte)*/
229
+    *olen = 2 + 2 + 2 + 2*(ssl->conf->dtls_srtp_profiles_list_len) + 1;
230
+}
231
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
232
+
233
 /*
234
  * Generate random bytes for ClientHello
235
  */
236
@@ -1006,6 +1079,11 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
237
     ext_len += olen;
238
 #endif
239
 
240
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
241
+    ssl_write_use_srtp_ext( ssl, p + 2 + ext_len, &olen );
242
+    ext_len += olen;
243
+#endif
244
+
245
 #if defined(MBEDTLS_SSL_SESSION_TICKETS)
246
     ssl_write_session_ticket_ext( ssl, p + 2 + ext_len, &olen );
247
     ext_len += olen;
248
@@ -1308,6 +1386,81 @@ static int ssl_parse_alpn_ext( mbedtls_ssl_context *ssl,
249
 }
250
 #endif /* MBEDTLS_SSL_ALPN */
251
 
252
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
253
+static int ssl_parse_use_srtp_ext( mbedtls_ssl_context *ssl,
254
+                               const unsigned char *buf, size_t len )
255
+{
256
+    enum mbedtls_DTLS_SRTP_protection_profiles server_protection = MBEDTLS_SRTP_UNSET_PROFILE;
257
+    size_t i;
258
+    uint16_t server_protection_profile_value = 0;
259
+
260
+    /* If use_srtp is not configured, just ignore the extension */
261
+    if( ( ssl->conf->dtls_srtp_profiles_list == NULL ) || ( ssl->conf->dtls_srtp_profiles_list_len == 0 ) )
262
+        return( 0 );
263
+
264
+    /* RFC5764 section 4.1.1
265
+     * uint8 SRTPProtectionProfile[2];
266
+     *
267
+     * struct {
268
+     *   SRTPProtectionProfiles SRTPProtectionProfiles;
269
+     *   opaque srtp_mki<0..255>;
270
+     * } UseSRTPData;
271
+
272
+     * SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
273
+     *
274
+     * Note: srtp_mki is not supported
275
+     */
276
+
277
+    /* Length is 5 : one protection profile(2 bytes) + length(2 bytes) and potential srtp_mki which won't be parsed */
278
+    if( len < 5 )
279
+        return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
280
+
281
+    /*
282
+     * get the server protection profile
283
+     */
284
+    if (((uint16_t)(buf[0]<<8 | buf[1])) != 0x0002) { /* protection profile length must be 0x0002 as we must have only one protection profile in server Hello */
285
+        return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
286
+    } else {
287
+        server_protection_profile_value = buf[2]<<8 | buf[3];
288
+    }
289
+
290
+    /*
291
+     * Check we have the server profile in our list
292
+     */
293
+    for( i=0; i < ssl->conf->dtls_srtp_profiles_list_len; i++)
294
+    {
295
+        switch ( server_protection_profile_value ) {
296
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE:
297
+                server_protection = MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80;
298
+                break;
299
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE:
300
+                server_protection = MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32;
301
+                break;
302
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE:
303
+                server_protection = MBEDTLS_SRTP_NULL_HMAC_SHA1_80;
304
+                break;
305
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE:
306
+                server_protection = MBEDTLS_SRTP_NULL_HMAC_SHA1_32;
307
+                break;
308
+            default:
309
+                server_protection = MBEDTLS_SRTP_UNSET_PROFILE;
310
+                break;
311
+        }
312
+
313
+        if (server_protection == ssl->conf->dtls_srtp_profiles_list[i]) {
314
+            ssl->chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profiles_list[i];
315
+            return 0;
316
+        }
317
+    }
318
+
319
+    /* If we get there, no match was found : server problem, it shall never answer with incompatible profile */
320
+    ssl->chosen_dtls_srtp_profile = MBEDTLS_SRTP_UNSET_PROFILE;
321
+    mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
322
+                            MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
323
+    return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
324
+}
325
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
326
+
327
 /*
328
  * Parse HelloVerifyRequest.  Only called after verifying the HS type.
329
  */
330
@@ -1786,6 +1939,16 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
331
             break;
332
 #endif /* MBEDTLS_SSL_ALPN */
333
 
334
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
335
+        case MBEDTLS_TLS_EXT_USE_SRTP:
336
+            MBEDTLS_SSL_DEBUG_MSG( 3, ( "found use_srtp extension" ) );
337
+
338
+            if( ( ret = ssl_parse_use_srtp_ext( ssl, ext + 4, ext_size ) ) != 0 )
339
+                return( ret );
340
+
341
+            break;
342
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
343
+
344
         default:
345
             MBEDTLS_SSL_DEBUG_MSG( 3, ( "unknown extension found: %d (ignoring)",
346
                            ext_id ) );
347
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
348
index 6b5b461..72b50ab 100644
349
--- library/ssl_srv.c
350
+++ library/ssl_srv.c
351
@@ -573,6 +573,78 @@ static int ssl_parse_alpn_ext( mbedtls_ssl_context *ssl,
352
 }
353
 #endif /* MBEDTLS_SSL_ALPN */
354
 
355
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
356
+static int ssl_parse_use_srtp_ext( mbedtls_ssl_context *ssl,
357
+                               const unsigned char *buf, size_t len )
358
+{
359
+    enum mbedtls_DTLS_SRTP_protection_profiles client_protection = MBEDTLS_SRTP_UNSET_PROFILE;
360
+    size_t i,j;
361
+    uint16_t profile_length;
362
+
363
+    /* If use_srtp is not configured, just ignore the extension */
364
+    if( ( ssl->conf->dtls_srtp_profiles_list == NULL ) || ( ssl->conf->dtls_srtp_profiles_list_len == 0 ) )
365
+        return( 0 );
366
+
367
+    /* RFC5764 section 4.1.1
368
+     * uint8 SRTPProtectionProfile[2];
369
+     *
370
+     * struct {
371
+     *   SRTPProtectionProfiles SRTPProtectionProfiles;
372
+     *   opaque srtp_mki<0..255>;
373
+     * } UseSRTPData;
374
+
375
+     * SRTPProtectionProfile SRTPProtectionProfiles<2..2^16-1>;
376
+     *
377
+     * Note: srtp_mki is not supported
378
+     */
379
+
380
+    /* Min length is 5 : at least one protection profile(2 bytes) and length(2 bytes) + srtp_mki length(1 byte) */
381
+    if( len < 5 )
382
+        return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO );
383
+
384
+    /*
385
+     * Use our order of preference
386
+     */
387
+    profile_length = buf[0]<<8|buf[1]; /* first 2 bytes are protection profile length(in bytes) */
388
+    for( i=0; i < ssl->conf->dtls_srtp_profiles_list_len; i++)
389
+    {
390
+        /* parse the extension list values are defined in http://www.iana.org/assignments/srtp-protection/srtp-protection.xhtml */
391
+        for (j=0; j<profile_length; j+=2) { /* parse only the protection profile, srtp_mki is not supported and ignored */
392
+            uint16_t protection_profile_value = buf[j+2]<<8 | buf[j+3]; /* +2 to skip the length field */
393
+
394
+            switch ( protection_profile_value ) {
395
+                case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE:
396
+                    client_protection = MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80;
397
+                    break;
398
+                case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE:
399
+                    client_protection = MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32;
400
+                    break;
401
+                case MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE:
402
+                    client_protection = MBEDTLS_SRTP_NULL_HMAC_SHA1_80;
403
+                    break;
404
+                case MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE:
405
+                    client_protection = MBEDTLS_SRTP_NULL_HMAC_SHA1_32;
406
+                    break;
407
+                default:
408
+                    client_protection = MBEDTLS_SRTP_UNSET_PROFILE;
409
+                    break;
410
+            }
411
+
412
+            if (client_protection == ssl->conf->dtls_srtp_profiles_list[i]) {
413
+                ssl->chosen_dtls_srtp_profile = ssl->conf->dtls_srtp_profiles_list[i];
414
+                return 0;
415
+            }
416
+        }
417
+    }
418
+
419
+    /* If we get there, no match was found */
420
+    ssl->chosen_dtls_srtp_profile = MBEDTLS_SRTP_UNSET_PROFILE;
421
+    mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
422
+                            MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
423
+    return( MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO );
424
+}
425
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
426
+
427
 /*
428
  * Auxiliary functions for ServerHello parsing and related actions
429
  */
430
@@ -1675,7 +1747,16 @@ read_record_header:
431
                 if( ret != 0 )
432
                     return( ret );
433
                 break;
434
-#endif /* MBEDTLS_SSL_SESSION_TICKETS */
435
+#endif /* MBEDTLS_SSL_ALPN */
436
+
437
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
438
+            case MBEDTLS_TLS_EXT_USE_SRTP:
439
+                MBEDTLS_SSL_DEBUG_MSG( 3, ( "found use_srtp extension" ) );
440
+                ret = ssl_parse_use_srtp_ext( ssl, ext + 4, ext_size );
441
+                if ( ret != 0)
442
+                    return( ret );
443
+                break;
444
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
445
 
446
             default:
447
                 MBEDTLS_SSL_DEBUG_MSG( 3, ( "unknown extension found: %d (ignoring)",
448
@@ -2144,6 +2225,57 @@ static void ssl_write_alpn_ext( mbedtls_ssl_context *ssl,
449
 }
450
 #endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */
451
 
452
+#if defined(MBEDTLS_SSL_DTLS_SRTP )
453
+static void ssl_write_use_srtp_ext( mbedtls_ssl_context *ssl,
454
+                                unsigned char *buf, size_t *olen )
455
+{
456
+    if( ssl->chosen_dtls_srtp_profile == MBEDTLS_SRTP_UNSET_PROFILE )
457
+    {
458
+        *olen = 0;
459
+        return;
460
+    }
461
+
462
+    MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, adding use_srtp extension" ) );
463
+
464
+    /* extension */
465
+    buf[0] = (unsigned char)( ( MBEDTLS_TLS_EXT_USE_SRTP >> 8 ) & 0xFF );
466
+    buf[1] = (unsigned char)( ( MBEDTLS_TLS_EXT_USE_SRTP      ) & 0xFF );
467
+    /* total length (5: only one profile(2 bytes) and length(2bytes) and srtp_mki not supported so zero length(1byte) ) */
468
+    buf[2] = 0x00;
469
+    buf[3] = 0x05;
470
+
471
+    /* protection profile length: 2 */
472
+    buf[4] = 0x00;
473
+    buf[5] = 0x02;
474
+    switch (ssl->chosen_dtls_srtp_profile) {
475
+        case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80:
476
+            buf[6] = (unsigned char)( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE >> 8) & 0xFF );
477
+            buf[7] = (unsigned char)( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80_IANA_VALUE     ) & 0xFF );
478
+            break;
479
+        case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32:
480
+            buf[6] = (unsigned char)( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE >> 8) & 0xFF );
481
+            buf[7] = (unsigned char)( ( MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32_IANA_VALUE     ) & 0xFF );
482
+            break;
483
+        case MBEDTLS_SRTP_NULL_HMAC_SHA1_80:
484
+            buf[6] = (unsigned char)( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE >> 8) & 0xFF );
485
+            buf[7] = (unsigned char)( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_80_IANA_VALUE     ) & 0xFF );
486
+            break;
487
+        case MBEDTLS_SRTP_NULL_HMAC_SHA1_32:
488
+            buf[6] = (unsigned char)( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE >> 8) & 0xFF );
489
+            buf[7] = (unsigned char)( ( MBEDTLS_SRTP_NULL_HMAC_SHA1_32_IANA_VALUE     ) & 0xFF );
490
+            break;
491
+        default:
492
+            *olen = 0;
493
+            return;
494
+            break;
495
+    }
496
+
497
+    buf[8] = 0x00; /* unsupported srtp_mki variable length vector set to 0 */
498
+
499
+    *olen = 9;
500
+}
501
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
502
+
503
 #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
504
 static int ssl_write_hello_verify_request( mbedtls_ssl_context *ssl )
505
 {
506
@@ -2408,6 +2540,11 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
507
     ext_len += olen;
508
 #endif
509
 
510
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
511
+    ssl_write_use_srtp_ext( ssl, p + 2 + ext_len, &olen);
512
+    ext_len += olen;
513
+#endif
514
+
515
     MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, total extension length: %d", ext_len ) );
516
 
517
     if( ext_len > 0 )
518
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
519
index 4424f56..940f8aa 100644
520
--- library/ssl_tls.c
521
+++ library/ssl_tls.c
522
@@ -373,7 +373,7 @@ static int tls_prf_generic( mbedtls_md_type_t md_type,
523
 {
524
     size_t nb;
525
     size_t i, j, k, md_len;
526
-    unsigned char tmp[128];
527
+    unsigned char tmp[144];
528
     unsigned char h_i[MBEDTLS_MD_MAX_SIZE];
529
     const mbedtls_md_info_t *md_info;
530
     mbedtls_md_context_t md_ctx;
531
@@ -636,6 +636,30 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl )
532
     else
533
         MBEDTLS_SSL_DEBUG_MSG( 3, ( "no premaster (session resumed)" ) );
534
 
535
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
536
+    /* check if we have a chosen srtp protection profile */
537
+    if (ssl->chosen_dtls_srtp_profile != MBEDTLS_SRTP_UNSET_PROFILE) {
538
+        /* derive key material for srtp session RFC5764 section 4.2 */
539
+        /* master key and master salt are respectively 128 bits and 112 bits for all currently available modes :
540
+         * SRTP_AES128_CM_HMAC_SHA1_80, SRTP_AES128_CM_HMAC_SHA1_32
541
+         * SRTP_NULL_HMAC_SHA1_80, SRTP_NULL_HMAC_SHA1_32
542
+         * So we must export 2*(128 + 112) = 480 bits
543
+         */
544
+        ssl->dtls_srtp_keys_len = 60;
545
+
546
+        ssl->dtls_srtp_keys = (unsigned char *)mbedtls_calloc(1, ssl->dtls_srtp_keys_len);
547
+
548
+        ret = handshake->tls_prf( session->master, 48, "EXTRACTOR-dtls_srtp",
549
+                        handshake->randbytes, 64, ssl->dtls_srtp_keys, ssl->dtls_srtp_keys_len );
550
+
551
+        if( ret != 0 )
552
+        {
553
+            MBEDTLS_SSL_DEBUG_RET( 1, "dtls srtp prf", ret );
554
+            return( ret );
555
+        }
556
+    }
557
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
558
+
559
     /*
560
      * Swap the client and server random values.
561
      */
562
@@ -5408,6 +5432,12 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl,
563
         ssl->in_msg = ssl->in_buf + 13;
564
     }
565
 
566
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
567
+    ssl->chosen_dtls_srtp_profile = MBEDTLS_SRTP_UNSET_PROFILE;
568
+    ssl->dtls_srtp_keys = NULL;
569
+    ssl->dtls_srtp_keys_len = 0;
570
+#endif
571
+
572
     if( ( ret = ssl_handshake_init( ssl ) ) != 0 )
573
         return( ret );
574
 
575
@@ -5997,6 +6027,61 @@ const char *mbedtls_ssl_get_alpn_protocol( const mbedtls_ssl_context *ssl )
576
 }
577
 #endif /* MBEDTLS_SSL_ALPN */
578
 
579
+#if defined(MBEDTLS_SSL_DTLS_SRTP)
580
+int mbedtls_ssl_conf_dtls_srtp_protection_profiles( mbedtls_ssl_config *conf, const enum mbedtls_DTLS_SRTP_protection_profiles *profiles, size_t profiles_number)
581
+{
582
+    size_t i;
583
+    /* check in put validity : must be a list of profiles from enumeration */
584
+    /* maximum length is 4 as only 4 protection profiles are defined */
585
+    if (profiles_number>4) {
586
+            return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
587
+    }
588
+
589
+    mbedtls_free(conf->dtls_srtp_profiles_list);
590
+    conf->dtls_srtp_profiles_list = (enum mbedtls_DTLS_SRTP_protection_profiles *)mbedtls_calloc(1, profiles_number*sizeof(enum mbedtls_DTLS_SRTP_protection_profiles));
591
+
592
+    for (i=0; i<profiles_number; i++) {
593
+        switch (profiles[i]) {
594
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_80:
595
+            case MBEDTLS_SRTP_AES128_CM_HMAC_SHA1_32:
596
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_80:
597
+            case MBEDTLS_SRTP_NULL_HMAC_SHA1_32:
598
+                conf->dtls_srtp_profiles_list[i] = profiles[i];
599
+                break;
600
+            default:
601
+                mbedtls_free(conf->dtls_srtp_profiles_list);
602
+                conf->dtls_srtp_profiles_list = NULL;
603
+                conf->dtls_srtp_profiles_list_len = 0;
604
+                return MBEDTLS_ERR_SSL_BAD_INPUT_DATA;
605
+        }
606
+    }
607
+
608
+    /* assign array length */
609
+    conf->dtls_srtp_profiles_list_len = profiles_number;
610
+
611
+    return( 0 );
612
+}
613
+
614
+enum mbedtls_DTLS_SRTP_protection_profiles mbedtls_ssl_get_dtls_srtp_protection_profile( const mbedtls_ssl_context *ssl)
615
+{
616
+    return( ssl->chosen_dtls_srtp_profile);
617
+}
618
+
619
+int mbedtls_ssl_get_dtls_srtp_key_material( const mbedtls_ssl_context *ssl, unsigned char *key, const size_t key_buffer_len, size_t *key_len ) {
620
+    *key_len = 0;
621
+
622
+    /* check output buffer size */
623
+    if ( key_buffer_len < ssl->dtls_srtp_keys_len) {
624
+        return MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL;
625
+    }
626
+
627
+    memcpy( key, ssl->dtls_srtp_keys, ssl->dtls_srtp_keys_len);
628
+    *key_len = ssl->dtls_srtp_keys_len;
629
+
630
+    return 0;
631
+}
632
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
633
+
634
 void mbedtls_ssl_conf_max_version( mbedtls_ssl_config *conf, int major, int minor )
635
 {
636
     conf->max_major_ver = major;
637
@@ -7083,6 +7169,11 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl )
638
     mbedtls_free( ssl->cli_id );
639
 #endif
640
 
641
+#if defined (MBEDTLS_SSL_DTLS_SRTP)
642
+    mbedtls_platform_zeroize( ssl->dtls_srtp_keys, ssl->dtls_srtp_keys_len );
643
+    mbedtls_free( ssl->dtls_srtp_keys );
644
+#endif /* MBEDTLS_SSL_DTLS_SRTP */
645
+
646
     MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= free" ) );
647
 
648
     /* Actually clear after last debug message */
649
@@ -7311,6 +7402,10 @@ void mbedtls_ssl_config_free( mbedtls_ssl_config *conf )
650
     ssl_key_cert_free( conf->key_cert );
651
 #endif
652
 
653
+#if defined (MBEDTLS_SSL_DTLS_SRTP)
654
+    mbedtls_free( conf->dtls_srtp_profiles_list );
655
+#endif
656
+
657
     mbedtls_platform_zeroize( conf, sizeof( mbedtls_ssl_config ) );
658
 }
659
 
(-)security/mbedtls/files/patch-library_bignum.c (+18 lines)
Added Link Here
1
https://github.com/ARMmbed/mbedtls/issues/4786
2
3
--- library/bignum.c.orig	2021-07-06 11:59:58 UTC
4
+++ library/bignum.c
5
@@ -1635,13 +1635,7 @@ int mbedtls_mpi_sub_int( mbedtls_mpi *X, const mbedtls
6
  * \param b             A scalar to multiply.
7
  */
8
 static
9
-#if defined(__APPLE__) && defined(__arm__)
10
-/*
11
- * Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
12
- * appears to need this to prevent bad ARM code generation at -O3.
13
- */
14
 __attribute__ ((noinline))
15
-#endif
16
 void mpi_mul_hlp( size_t i,
17
                   const mbedtls_mpi_uint *s,
18
                   mbedtls_mpi_uint *d,
(-)security/mbedtls/pkg-plist (-3 / +36 lines)
Lines 4-9 bin/mbedtls_cert_req Link Here
4
bin/mbedtls_cert_write
4
bin/mbedtls_cert_write
5
bin/mbedtls_crl_app
5
bin/mbedtls_crl_app
6
bin/mbedtls_crypt_and_hash
6
bin/mbedtls_crypt_and_hash
7
bin/mbedtls_crypto_examples
7
bin/mbedtls_dh_client
8
bin/mbedtls_dh_client
8
bin/mbedtls_dh_genprime
9
bin/mbedtls_dh_genprime
9
bin/mbedtls_dh_server
10
bin/mbedtls_dh_server
Lines 11-16 bin/mbedtls_dtls_client Link Here
11
bin/mbedtls_dtls_server
12
bin/mbedtls_dtls_server
12
bin/mbedtls_ecdh_curve25519
13
bin/mbedtls_ecdh_curve25519
13
bin/mbedtls_ecdsa
14
bin/mbedtls_ecdsa
15
bin/mbedtls_fuzz_client
16
bin/mbedtls_fuzz_dtlsclient
17
bin/mbedtls_fuzz_dtlsserver
18
bin/mbedtls_fuzz_privkey
19
bin/mbedtls_fuzz_pubkey
20
bin/mbedtls_fuzz_server
21
bin/mbedtls_fuzz_x509crl
22
bin/mbedtls_fuzz_x509crt
23
bin/mbedtls_fuzz_x509csr
14
bin/mbedtls_gen_entropy
24
bin/mbedtls_gen_entropy
15
bin/mbedtls_gen_key
25
bin/mbedtls_gen_key
16
bin/mbedtls_gen_random_ctr_drbg
26
bin/mbedtls_gen_random_ctr_drbg
Lines 19-24 bin/mbedtls_generic_sum Link Here
19
bin/mbedtls_hello
29
bin/mbedtls_hello
20
bin/mbedtls_key_app
30
bin/mbedtls_key_app
21
bin/mbedtls_key_app_writer
31
bin/mbedtls_key_app_writer
32
bin/mbedtls_key_ladder_demo
33
bin/mbedtls_key_ladder_demo.sh
22
bin/mbedtls_mini_client
34
bin/mbedtls_mini_client
23
bin/mbedtls_mpi_demo
35
bin/mbedtls_mpi_demo
24
bin/mbedtls_pem2der
36
bin/mbedtls_pem2der
Lines 26-31 bin/mbedtls_pk_decrypt Link Here
26
bin/mbedtls_pk_encrypt
38
bin/mbedtls_pk_encrypt
27
bin/mbedtls_pk_sign
39
bin/mbedtls_pk_sign
28
bin/mbedtls_pk_verify
40
bin/mbedtls_pk_verify
41
bin/mbedtls_psa_constant_names
29
bin/mbedtls_query_compile_time_config
42
bin/mbedtls_query_compile_time_config
30
bin/mbedtls_req_app
43
bin/mbedtls_req_app
31
bin/mbedtls_rsa_decrypt
44
bin/mbedtls_rsa_decrypt
Lines 38-43 bin/mbedtls_rsa_verify_pss Link Here
38
bin/mbedtls_selftest
51
bin/mbedtls_selftest
39
bin/mbedtls_ssl_client1
52
bin/mbedtls_ssl_client1
40
bin/mbedtls_ssl_client2
53
bin/mbedtls_ssl_client2
54
bin/mbedtls_ssl_context_info
41
bin/mbedtls_ssl_fork_server
55
bin/mbedtls_ssl_fork_server
42
bin/mbedtls_ssl_mail_client
56
bin/mbedtls_ssl_mail_client
43
bin/mbedtls_ssl_server
57
bin/mbedtls_ssl_server
Lines 67-72 include/mbedtls/cipher_internal.h Link Here
67
include/mbedtls/cmac.h
81
include/mbedtls/cmac.h
68
include/mbedtls/compat-1.3.h
82
include/mbedtls/compat-1.3.h
69
include/mbedtls/config.h
83
include/mbedtls/config.h
84
include/mbedtls/config_psa.h
70
include/mbedtls/ctr_drbg.h
85
include/mbedtls/ctr_drbg.h
71
include/mbedtls/debug.h
86
include/mbedtls/debug.h
72
include/mbedtls/des.h
87
include/mbedtls/des.h
Lines 104-109 include/mbedtls/platform.h Link Here
104
include/mbedtls/platform_time.h
119
include/mbedtls/platform_time.h
105
include/mbedtls/platform_util.h
120
include/mbedtls/platform_util.h
106
include/mbedtls/poly1305.h
121
include/mbedtls/poly1305.h
122
include/mbedtls/psa_util.h
107
include/mbedtls/ripemd160.h
123
include/mbedtls/ripemd160.h
108
include/mbedtls/rsa.h
124
include/mbedtls/rsa.h
109
include/mbedtls/rsa_internal.h
125
include/mbedtls/rsa_internal.h
Lines 124-135 include/mbedtls/x509_crl.h Link Here
124
include/mbedtls/x509_crt.h
140
include/mbedtls/x509_crt.h
125
include/mbedtls/x509_csr.h
141
include/mbedtls/x509_csr.h
126
include/mbedtls/xtea.h
142
include/mbedtls/xtea.h
143
include/psa/crypto.h
144
include/psa/crypto_builtin_composites.h
145
include/psa/crypto_builtin_primitives.h
146
include/psa/crypto_compat.h
147
include/psa/crypto_config.h
148
include/psa/crypto_driver_common.h
149
include/psa/crypto_driver_contexts_composites.h
150
include/psa/crypto_driver_contexts_primitives.h
151
include/psa/crypto_extra.h
152
include/psa/crypto_platform.h
153
include/psa/crypto_se_driver.h
154
include/psa/crypto_sizes.h
155
include/psa/crypto_struct.h
156
include/psa/crypto_types.h
157
include/psa/crypto_values.h
127
lib/libmbedcrypto.a
158
lib/libmbedcrypto.a
128
lib/libmbedcrypto.so
159
lib/libmbedcrypto.so
129
lib/libmbedcrypto.so.3
160
lib/libmbedcrypto.so.7
130
lib/libmbedtls.a
161
lib/libmbedtls.a
131
lib/libmbedtls.so
162
lib/libmbedtls.so
132
lib/libmbedtls.so.12
163
lib/libmbedtls.so.13
133
lib/libmbedx509.a
164
lib/libmbedx509.a
134
lib/libmbedx509.so
165
lib/libmbedx509.so
135
lib/libmbedx509.so.0
166
lib/libmbedx509.so.1
167
@dir include/mbedtls
168
@dir include/psa

Return to bug 255084