New functions to get key types without dereferncing EVP_PKEY.

More error checking for RSA pmeth.
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 730520f..752547d 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -297,6 +297,16 @@
 	return NID_undef;
 	}
 
+int EVP_PKEY_id(const EVP_PKEY *pkey)
+	{
+	return pkey->type;
+	}
+
+int EVP_PKEY_base_id(const EVP_PKEY *pkey)
+	{
+	return EVP_PKEY_type(pkey->type);
+	}
+
 void EVP_PKEY_free(EVP_PKEY *x)
 	{
 	int i;