Fix error code

PSA_ERROR_BAD_STATE means that the function was called on a context in a
bad state.

This error is something that can't happen while only using the PSA API and
therefore a PSA_ERROR_CORRUPTION_DETECTED is a more appropriate error
code.
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 9d02a97..4b7ae1f 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -4141,7 +4141,7 @@
      * object was corrupted or if this function is called directly
      * inside the library. */
     if( tls12_prf->block_number == 0xff )
-        return( PSA_ERROR_BAD_STATE );
+        return( PSA_ERROR_CORRUPTION_DETECTED );
 
     /* We need a new block */
     ++tls12_prf->block_number;