aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_pkey.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-02-19 16:06:34 +0000
committerRichard Levitte <levitte@openssl.org>2001-02-19 16:06:34 +0000
commitcf1b7d96647d55e533f779e476e3d4371f40445a (patch)
treef7d6534cf77223190eaefe68d9e192d3d1246206 /crypto/evp/evp_pkey.c
parent649c5a2b096e89692b07dbbe19d2dbb12a9db075 (diff)
downloadopenssl-cf1b7d96647d55e533f779e476e3d4371f40445a.tar.gz
Make all configuration macros available for application by making
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
Diffstat (limited to 'crypto/evp/evp_pkey.c')
-rw-r--r--crypto/evp/evp_pkey.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c
index 0f34847333..05fcb2a8f2 100644
--- a/crypto/evp/evp_pkey.c
+++ b/crypto/evp/evp_pkey.c
@@ -69,10 +69,10 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey);
EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
{
EVP_PKEY *pkey = NULL;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
RSA *rsa = NULL;
#endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
DSA *dsa = NULL;
ASN1_INTEGER *privkey;
ASN1_TYPE *t1, *t2, *param = NULL;
@@ -102,7 +102,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
a = p8->pkeyalg;
switch (OBJ_obj2nid(a->algorithm))
{
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
case NID_rsaEncryption:
cp = p;
if (!(rsa = d2i_RSAPrivateKey (NULL,&cp, pkeylen))) {
@@ -112,7 +112,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
EVP_PKEY_assign_RSA (pkey, rsa);
break;
#endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
case NID_dsa:
/* PKCS#8 DSA is weird: you just get a private key integer
* and parameters in the AlgorithmIdentifier the pubkey must
@@ -241,7 +241,7 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken)
}
p8->pkey->type = V_ASN1_OCTET_STRING;
switch (EVP_PKEY_type(pkey->type)) {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
case EVP_PKEY_RSA:
if(p8->broken == PKCS8_NO_OCTET) p8->pkey->type = V_ASN1_SEQUENCE;
@@ -256,7 +256,7 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken)
}
break;
#endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
case EVP_PKEY_DSA:
if(!dsa_pkey2pkcs8(p8, pkey)) {
PKCS8_PRIV_KEY_INFO_free (p8);
@@ -298,7 +298,7 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken)
}
}
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
{
ASN1_STRING *params;