Skip to content

Commit 4023078

Browse files
committed
[NUC472/M487] Remove unnecessary H/W context clone functions in SHA alter.
1 parent acff29e commit 4023078

File tree

4 files changed

+0
-40
lines changed

4 files changed

+0
-40
lines changed

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/sha/sha_alt_hw.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ void mbedtls_sha1_hw_free(crypto_sha_context *ctx)
5959
crypto_zeroize(ctx, sizeof(*ctx));
6060
}
6161

62-
void mbedtls_sha1_hw_clone(crypto_sha_context *dst,
63-
const crypto_sha_context *src)
64-
{
65-
*dst = *src;
66-
}
67-
6862
void mbedtls_sha1_hw_starts(crypto_sha_context *ctx)
6963
{
7064
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
@@ -138,12 +132,6 @@ void mbedtls_sha256_hw_free(crypto_sha_context *ctx)
138132
crypto_zeroize(ctx, sizeof(*ctx));
139133
}
140134

141-
void mbedtls_sha256_hw_clone(crypto_sha_context *dst,
142-
const crypto_sha_context *src)
143-
{
144-
*dst = *src;
145-
}
146-
147135
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224)
148136
{
149137
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
@@ -219,12 +207,6 @@ void mbedtls_sha512_hw_free(crypto_sha_context *ctx)
219207
crypto_zeroize(ctx, sizeof(*ctx));
220208
}
221209

222-
void mbedtls_sha512_hw_clone(crypto_sha_context *dst,
223-
const crypto_sha_context *src)
224-
{
225-
*dst = *src;
226-
}
227-
228210
void mbedtls_sha512_hw_starts( crypto_sha_context *ctx, int is384)
229211
{
230212
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/sha/sha_alt_hw.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen);
4747

4848
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
4949
void mbedtls_sha1_hw_free( crypto_sha_context *ctx );
50-
void mbedtls_sha1_hw_clone( crypto_sha_context *dst,
51-
const crypto_sha_context *src );
5250
void mbedtls_sha1_hw_starts( crypto_sha_context *ctx );
5351
void mbedtls_sha1_hw_update( crypto_sha_context *ctx, const unsigned char *input, size_t ilen );
5452
void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] );
@@ -60,8 +58,6 @@ void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[
6058

6159
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
6260
void mbedtls_sha256_hw_free( crypto_sha_context *ctx );
63-
void mbedtls_sha256_hw_clone( crypto_sha_context *dst,
64-
const crypto_sha_context *src );
6561
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224 );
6662
void mbedtls_sha256_hw_update( crypto_sha_context *ctx, const unsigned char *input,
6763
size_t ilen );
@@ -74,8 +70,6 @@ void mbedtls_sha256_hw_process( crypto_sha_context *ctx, const unsigned char dat
7470

7571
void mbedtls_sha512_hw_init( crypto_sha_context *ctx );
7672
void mbedtls_sha512_hw_free( crypto_sha_context *ctx );
77-
void mbedtls_sha512_hw_clone( crypto_sha_context *dst,
78-
const crypto_sha_context *src );
7973
void mbedtls_sha512_hw_starts( crypto_sha_context *ctx, int is384 );
8074
void mbedtls_sha512_hw_update( crypto_sha_context *ctx, const unsigned char *input,
8175
size_t ilen );

features/mbedtls/targets/TARGET_NUVOTON/TARGET_NUC472/sha/sha_alt_hw.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ void mbedtls_sha1_hw_free(crypto_sha_context *ctx)
5959
crypto_zeroize(ctx, sizeof(*ctx));
6060
}
6161

62-
void mbedtls_sha1_hw_clone(crypto_sha_context *dst,
63-
const crypto_sha_context *src)
64-
{
65-
*dst = *src;
66-
}
67-
6862
void mbedtls_sha1_hw_starts(crypto_sha_context *ctx)
6963
{
7064
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.
@@ -138,12 +132,6 @@ void mbedtls_sha256_hw_free(crypto_sha_context *ctx)
138132
crypto_zeroize(ctx, sizeof(*ctx));
139133
}
140134

141-
void mbedtls_sha256_hw_clone(crypto_sha_context *dst,
142-
const crypto_sha_context *src)
143-
{
144-
*dst = *src;
145-
}
146-
147135
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224)
148136
{
149137
// NOTE: mbedtls may call mbedtls_shaXXX_starts multiple times and then call the ending mbedtls_shaXXX_finish. Guard from it.

features/mbedtls/targets/TARGET_NUVOTON/TARGET_NUC472/sha/sha_alt_hw.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ void crypto_sha_getinternstate(unsigned char output[], size_t olen);
4747

4848
void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
4949
void mbedtls_sha1_hw_free( crypto_sha_context *ctx );
50-
void mbedtls_sha1_hw_clone( crypto_sha_context *dst,
51-
const crypto_sha_context *src );
5250
void mbedtls_sha1_hw_starts( crypto_sha_context *ctx );
5351
void mbedtls_sha1_hw_update( crypto_sha_context *ctx, const unsigned char *input, size_t ilen );
5452
void mbedtls_sha1_hw_finish( crypto_sha_context *ctx, unsigned char output[20] );
@@ -60,8 +58,6 @@ void mbedtls_sha1_hw_process( crypto_sha_context *ctx, const unsigned char data[
6058

6159
void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
6260
void mbedtls_sha256_hw_free( crypto_sha_context *ctx );
63-
void mbedtls_sha256_hw_clone( crypto_sha_context *dst,
64-
const crypto_sha_context *src );
6561
void mbedtls_sha256_hw_starts( crypto_sha_context *ctx, int is224 );
6662
void mbedtls_sha256_hw_update( crypto_sha_context *ctx, const unsigned char *input,
6763
size_t ilen );

0 commit comments

Comments
 (0)