Commit 15fc55dc authored by Aleksey's avatar Aleksey Committed by Uze Choi

Update message for mbedtls optimization

Abort message of mbedtls optimization patch was updated
since before removed mbedtls implementation can't be detected
by abort print output.

Change-Id: I0133474a3a0f2b57c853c8762b6a01d0ce912e04
Signed-off-by: Aleksey's avatarAleksey Volkov <a.volkov@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/26759Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
Reviewed-by: default avatarJongmin Choi <jminl.choi@samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 01791b29
From 5f4a89ea42a50d3211b006a52fdfc7586e3fd412 Mon Sep 17 00:00:00 2001
From 66ac7f3fd595e1779c98fe2b0918551e3c2b9513 Mon Sep 17 00:00:00 2001
From: Oleksii Beketov <ol.beketov@samsung.com>
Date: Mon, 30 Jul 2018 13:38:45 +0300
Subject: [PATCH] Reduce MbedTLS
......@@ -6,6 +6,7 @@ Subject: [PATCH] Reduce MbedTLS
Reduce MbedTLS routines due memory optimization
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
---
include/mbedtls/config.h | 16 ++++++++++++++--
library/asn1parse.c | 23 +++++++++++++++++++++++
......@@ -23,7 +24,7 @@ index 45143a5..aa476c3 100644
@@ -58,8 +58,17 @@
#define MBEDTLS_SSL_SRV_C
#define MBEDTLS_SSL_TLS_C
+/* Raw Public Key*/
+#define MBEDTLS_ECDH_C
+#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
......@@ -35,7 +36,7 @@ index 45143a5..aa476c3 100644
+#ifndef ST_MBEDTLS_OPT
#define MBEDTLS_AES_ROM_TABLES
+#endif
/* Save some RAM by adjusting to your exact needs */
#define MBEDTLS_PSK_MAX_LEN 16 /* 128-bits keys are generally enough */
@@ -82,12 +91,13 @@
......@@ -52,7 +53,7 @@ index 45143a5..aa476c3 100644
#define MBEDTLS_X509_CRT_PARSE_C
-
#define MBEDTLS_X509_USE_C
#define MBEDTLS_ASN1_PARSE_C
@@ -98,7 +108,9 @@
#define MBEDTLS_ASN1_WRITE_C
......@@ -61,11 +62,11 @@ index 45143a5..aa476c3 100644
+#ifndef ST_MBEDTLS_OPT
#define MBEDTLS_CCM_C
+#endif
#define MBEDTLS_CIPHER_MODE_CBC
diff --git a/library/asn1parse.c b/library/asn1parse.c
index 4dd65c0..18d6b83 100644
index 4dd65c0..8809a87 100644
--- a/library/asn1parse.c
+++ b/library/asn1parse.c
@@ -243,6 +243,7 @@ int mbedtls_asn1_get_sequence_of( unsigned char **p,
......@@ -78,14 +79,14 @@ index 4dd65c0..18d6b83 100644
mbedtls_asn1_buf *buf;
@@ -286,6 +287,10 @@ int mbedtls_asn1_get_sequence_of( unsigned char **p,
return( MBEDTLS_ERR_ASN1_LENGTH_MISMATCH );
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
int mbedtls_asn1_get_alg( unsigned char **p,
@@ -336,6 +341,7 @@ int mbedtls_asn1_get_alg_null( unsigned char **p,
const unsigned char *end,
......@@ -94,47 +95,47 @@ index 4dd65c0..18d6b83 100644
+#ifndef ST_MBEDTLS_OPT
int ret;
mbedtls_asn1_buf params;
@@ -348,10 +354,15 @@ int mbedtls_asn1_get_alg_null( unsigned char **p,
return( MBEDTLS_ERR_ASN1_INVALID_DATA );
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *cur )
{
+#ifndef ST_MBEDTLS_OPT
if( cur == NULL )
return;
@@ -359,10 +370,14 @@ void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *cur )
mbedtls_free( cur->val.p );
mbedtls_zeroize( cur, sizeof( mbedtls_asn1_named_data ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+#endif /* ST_MBEDTLS_OPT */
}
void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head )
{
+#ifndef ST_MBEDTLS_OPT
mbedtls_asn1_named_data *cur;
while( ( cur = *head ) != NULL )
@@ -371,11 +386,15 @@ void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head )
mbedtls_asn1_free_named_data( cur );
mbedtls_free( cur );
}
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+#endif /* ST_MBEDTLS_OPT */
}
mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *list,
const char *oid, size_t len )
{
......@@ -144,35 +145,35 @@ index 4dd65c0..18d6b83 100644
if( list->oid.len == len &&
@@ -388,6 +407,10 @@ mbedtls_asn1_named_data *mbedtls_asn1_find_named_data( mbedtls_asn1_named_data *
}
return( list );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_ASN1_PARSE_C */
diff --git a/library/bignum.c b/library/bignum.c
index 6fdf317..19435ea 100644
index 6fdf317..8834ffe 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -286,6 +286,7 @@ int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char sw
}
cleanup:
+
return( ret );
}
@@ -419,7 +420,6 @@ static int mpi_get_digit( mbedtls_mpi_uint *d, int radix, char c )
if( *d >= (mbedtls_mpi_uint) radix )
return( MBEDTLS_ERR_MPI_INVALID_CHARACTER );
-
return( 0 );
}
@@ -500,6 +500,7 @@ cleanup:
*/
static int mpi_write_hlp( mbedtls_mpi *X, int radix, char **p )
......@@ -180,17 +181,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
int ret;
mbedtls_mpi_uint r;
@@ -520,6 +521,10 @@ static int mpi_write_hlp( mbedtls_mpi *X, int radix, char **p )
cleanup:
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -528,6 +533,7 @@ cleanup:
int mbedtls_mpi_write_string( const mbedtls_mpi *X, int radix,
......@@ -202,14 +203,14 @@ index 6fdf317..19435ea 100644
char *p;
@@ -596,6 +602,10 @@ cleanup:
mbedtls_mpi_free( &T );
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#if defined(MBEDTLS_FS_IO)
@@ -1077,6 +1087,7 @@ cleanup:
*/
......@@ -218,17 +219,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
@@ -1086,6 +1097,10 @@ int mbedtls_mpi_add_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_sint
_B.p = p;
return( mbedtls_mpi_add_mpi( X, A, &_B ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -1445,6 +1460,7 @@ cleanup:
*/
......@@ -237,17 +238,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
mbedtls_mpi _B;
mbedtls_mpi_uint p[1];
@@ -1454,6 +1470,10 @@ int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, m
_B.p = p;
return( mbedtls_mpi_div_mpi( Q, R, A, &_B ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -1484,6 +1504,7 @@ cleanup:
*/
......@@ -256,17 +257,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
size_t i;
mbedtls_mpi_uint x, y, z;
@@ -1532,7 +1553,8 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_
y = b - y;
*r = y;
-
+#endif
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
return( 0 );
}
@@ -1541,6 +1563,7 @@ int mbedtls_mpi_mod_int( mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_
*/
static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N )
......@@ -274,16 +275,16 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
mbedtls_mpi_uint x, m0 = N->p[0];
unsigned int i;
@@ -1551,6 +1574,9 @@ static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N )
x *= ( 2 - ( m0 * x ) );
*mm = ~x + 1;
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -1559,6 +1585,7 @@ static void mpi_montg_init( mbedtls_mpi_uint *mm, const mbedtls_mpi *N )
static int mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi *N, mbedtls_mpi_uint mm,
......@@ -292,17 +293,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
size_t i, n, m;
mbedtls_mpi_uint u0, u1, *d;
@@ -1592,7 +1619,8 @@ static int mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi
else
/* prevent timing attacks */
mpi_sub_hlp( n, A->p, T->p );
-
+#endif
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
return( 0 );
}
@@ -1601,6 +1629,7 @@ static int mpi_montmul( mbedtls_mpi *A, const mbedtls_mpi *B, const mbedtls_mpi
*/
static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint mm, const mbedtls_mpi *T )
......@@ -310,17 +311,17 @@ index 6fdf317..19435ea 100644
+#ifndef ST_MBEDTLS_OPT
mbedtls_mpi_uint z = 1;
mbedtls_mpi U;
@@ -1608,6 +1637,10 @@ static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint m
U.p = &z;
return( mpi_montmul( A, &U, N, mm, T ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -1615,6 +1648,7 @@ static int mpi_montred( mbedtls_mpi *A, const mbedtls_mpi *N, mbedtls_mpi_uint m
*/
......@@ -332,17 +333,17 @@ index 6fdf317..19435ea 100644
size_t i, j, nblimbs;
@@ -1816,6 +1850,10 @@ cleanup:
mbedtls_mpi_free( &RR );
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
diff --git a/library/ecdsa.c b/library/ecdsa.c
index 826fefe..617ae7a 100644
index 826fefe..e535e08 100644
--- a/library/ecdsa.c
+++ b/library/ecdsa.c
@@ -74,6 +74,7 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
......@@ -355,15 +356,15 @@ index 826fefe..617ae7a 100644
mbedtls_mpi k, e, t;
@@ -157,6 +158,10 @@ cleanup:
mbedtls_mpi_free( &k ); mbedtls_mpi_free( &e ); mbedtls_mpi_free( &t );
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT*/
}
#endif /* MBEDTLS_ECDSA_SIGN_ALT */
@@ -292,6 +297,7 @@ cleanup:
static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s,
unsigned char *sig, size_t *slen )
......@@ -374,14 +375,14 @@ index 826fefe..617ae7a 100644
unsigned char *p = buf + sizeof( buf );
@@ -308,6 +314,10 @@ static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s,
*slen = len;
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -319,6 +329,7 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t
int (*f_rng)(void *, unsigned char *, size_t),
......@@ -390,17 +391,17 @@ index 826fefe..617ae7a 100644
+#ifndef ST_MBEDTLS_OPT
int ret;
mbedtls_mpi r, s;
@@ -345,6 +356,10 @@ cleanup:
mbedtls_mpi_free( &s );
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#if ! defined(MBEDTLS_DEPRECATED_REMOVED) && \
@@ -417,8 +432,13 @@ cleanup:
int mbedtls_ecdsa_genkey( mbedtls_ecdsa_context *ctx, mbedtls_ecp_group_id gid,
......@@ -410,14 +411,14 @@ index 826fefe..617ae7a 100644
return( mbedtls_ecp_group_load( &ctx->grp, gid ) ||
mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_ECDSA_GENKEY_ALT */
diff --git a/library/pk.c b/library/pk.c
index b52c73f..c0d9fe7 100644
index b52c73f..efb47fe 100644
--- a/library/pk.c
+++ b/library/pk.c
@@ -258,6 +258,7 @@ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
......@@ -429,15 +430,15 @@ index b52c73f..c0d9fe7 100644
pk_hashlen_helper( md_alg, &hash_len ) != 0 )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
@@ -267,6 +268,10 @@ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
return( ctx->pk_info->sign_func( ctx->pk_ctx, md_alg, hash, hash_len,
sig, sig_len, f_rng, p_rng ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -277,6 +282,7 @@ int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
unsigned char *output, size_t *olen, size_t osize,
......@@ -446,17 +447,17 @@ index b52c73f..c0d9fe7 100644
+#ifndef ST_MBEDTLS_OPT
if( ctx == NULL || ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
@@ -285,6 +291,10 @@ int mbedtls_pk_decrypt( mbedtls_pk_context *ctx,
return( ctx->pk_info->decrypt_func( ctx->pk_ctx, input, ilen,
output, olen, osize, f_rng, p_rng ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -295,6 +305,7 @@ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
unsigned char *output, size_t *olen, size_t osize,
......@@ -465,17 +466,17 @@ index b52c73f..c0d9fe7 100644
+#ifndef ST_MBEDTLS_OPT
if( ctx == NULL || ctx->pk_info == NULL )
return( MBEDTLS_ERR_PK_BAD_INPUT_DATA );
@@ -303,6 +314,10 @@ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
return( ctx->pk_info->encrypt_func( ctx->pk_ctx, input, ilen,
output, olen, osize, f_rng, p_rng ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -310,6 +325,7 @@ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx,
*/
......@@ -487,17 +488,17 @@ index b52c73f..c0d9fe7 100644
prv->pk_info->check_pair_func == NULL )
@@ -329,6 +345,10 @@ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_conte
}
return( prv->pk_info->check_pair_func( pub->pk_ctx, prv->pk_ctx ) );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif
}
/*
diff --git a/library/pkparse.c b/library/pkparse.c
index e19511e..5cb5e39 100644
index e19511e..44ddbb7 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -179,6 +179,7 @@ int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path )
......@@ -506,18 +507,18 @@ index e19511e..5cb5e39 100644
{
+#ifndef ST_MBEDTLS_OPT
int ret;
/* Tag may be either OID or SEQUENCE */
@@ -206,6 +207,10 @@ static int pk_get_ecparams( unsigned char **p, const unsigned char *end,
MBEDTLS_ERR_ASN1_LENGTH_MISMATCH );
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED)
@@ -793,6 +798,7 @@ static int pk_parse_key_sec1_der( mbedtls_ecp_keypair *eck,
const unsigned char *key,
......@@ -529,15 +530,15 @@ index e19511e..5cb5e39 100644
size_t len;
@@ -911,6 +917,10 @@ static int pk_parse_key_sec1_der( mbedtls_ecp_keypair *eck,
}
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_ECP_C */
@@ -932,6 +942,7 @@ static int pk_parse_key_pkcs8_unencrypted_der(
const unsigned char* key,
size_t keylen )
......@@ -548,14 +549,14 @@ index e19511e..5cb5e39 100644
mbedtls_asn1_buf params;
@@ -1010,6 +1021,10 @@ static int pk_parse_key_pkcs8_unencrypted_der(
return( MBEDTLS_ERR_PK_UNKNOWN_PK_ALG );
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
/*
@@ -1349,6 +1364,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk,
int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
......@@ -567,17 +568,17 @@ index e19511e..5cb5e39 100644
#if defined(MBEDTLS_PEM_PARSE_C)
@@ -1389,6 +1405,10 @@ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx,
#endif
return( ret );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return( 0 );
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_PK_PARSE_C */
diff --git a/library/ssl_cli.c b/library/ssl_cli.c
index e9b0d82..b9289e2 100644
index e9b0d82..94ff8e7 100644
--- a/library/ssl_cli.c
+++ b/library/ssl_cli.c
@@ -1132,6 +1132,7 @@ static int ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl,
......@@ -590,15 +591,15 @@ index e9b0d82..b9289e2 100644
* and if so the server's value should match ours (and len is always 1)
@@ -1147,6 +1148,10 @@ static int ssl_parse_max_fragment_length_ext( mbedtls_ssl_context *ssl,
}
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return (0);
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
@@ -1246,6 +1251,7 @@ static int ssl_parse_supported_point_formats_ext( mbedtls_ssl_context *ssl,
const unsigned char *buf,
size_t len )
......@@ -606,13 +607,13 @@ index e9b0d82..b9289e2 100644
+#ifndef ST_MBEDTLS_OPT
size_t list_size;
const unsigned char *p;
@@ -1282,6 +1288,10 @@ static int ssl_parse_supported_point_formats_ext( mbedtls_ssl_context *ssl,
mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL,
MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE );
return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return (0);
+#endif /* ST_MBEDTLS_OPT */
}
......@@ -625,18 +626,18 @@ index e9b0d82..b9289e2 100644
+#ifndef ST_MBEDTLS_OPT
int ret = 0;
size_t n;
@@ -2141,6 +2152,10 @@ static int ssl_parse_server_psk_hint( mbedtls_ssl_context *ssl,
*p += n;
return( 0 );
+#else
+ oc_abort("ST_APP Skipped for optimization");
+ oc_abort(__func__);
+ return (0);
+#endif /* ST_MBEDTLS_OPT */
}
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */
--
1.9.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment