Changing buffer size checks.

Signed-off-by: pespacek <peter.spacek@silabs.com>
diff --git a/library/x509write_crt.c b/library/x509write_crt.c
index b0589cc..6703474 100644
--- a/library/x509write_crt.c
+++ b/library/x509write_crt.c
@@ -236,9 +236,9 @@
                           mbedtls_pk_write_pubkey( &c, buf, ctx->issuer_key ) );
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
     status = psa_hash_compute( PSA_ALG_SHA_1,
-                               buf + sizeof( buf ) - len,
+                               buf + sizeof(buf) - len,
                                len,
-                               buf + sizeof( buf ) - 20 ,
+                               buf + sizeof(buf) - 20,
                                PSA_HASH_LENGTH(PSA_ALG_SHA_1),
                                &hash_length );
     if( status != PSA_SUCCESS )
@@ -523,7 +523,7 @@
                                c,
                                len,
                                hash,
-                               PSA_HASH_MAX_SIZE,
+                               sizeof( hash ),
                                &hash_length );
     if( status != PSA_SUCCESS )
     {