Move RSA_ALT pk_info type check to the respective check_pair function

diff --git a/library/pk_wrap.c b/library/pk_wrap.c
index 17df304..6098ac1 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -486,6 +486,13 @@
     unsigned char hash[32];
     size_t sig_len = 0;
     int ret;
+    const mbedtls_pk_context* prv_context = prv;
+
+    if( prv_context->pk_info->type == MBEDTLS_PK_RSA_ALT )
+    {
+        if( pub->pk_info->type != MBEDTLS_PK_RSA )
+            return( MBEDTLS_ERR_PK_TYPE_MISMATCH );
+    }
 
     if( rsa_alt_get_bitlen( prv ) != rsa_get_bitlen( pub->pk_ctx ) )
         return( MBEDTLS_ERR_RSA_KEY_CHECK_FAILED );