Skip to content

Commit 41a25e6

Browse files
author
Netanel Gonen
committed
update random seed uid define name
1 parent 985cacc commit 41a25e6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

features/mbedtls/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/src/default_random_seed.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@
66
int mbed_default_seed_read(unsigned char *buf, size_t buf_len)
77
{
88
psa_its_status_t rc = psa_its_get(MBED_RANDOM_SEED_ITS_UID, 0, buf_len, buf);
9-
/* Make sure that in case of an error the value will be negative
10-
* Mbed TLS errors are negative values */
11-
rc = rc < 0 ? rc : (-1 * rc);
12-
return (rc);
9+
return (-1 * rc);
1310
}
1411

1512
int mbed_default_seed_write(unsigned char *buf, size_t buf_len)
1613
{
17-
psa_its_status_t rc = psa_its_set(MBED_RANDOM_SEED_ITS_UID, buf_len, buf, 0);
18-
/* Make sure that in case of an error the value will be negative
19-
* Mbed TLS errors are negative values */
20-
rc = rc < 0 ? rc : (-1 * rc);
21-
return (rc);
14+
psa_its_status_t rc = psa_its_set(MBEDTLS_RANDOM_SEED_ITS_UID, buf_len, buf, 0);
15+
return (-1 * rc);
2216
}
2317

0 commit comments

Comments
 (0)