Transparent support for PKCS#8 private keys in RSA/DSA.
[openssl.git] / crypto / x509 / x_all.c
index 354d4c3..4973c18 100644 (file)
@@ -285,10 +285,22 @@ RSA *d2i_RSAPublicKey_fp(FILE *fp, RSA **rsa)
                (unsigned char **)(rsa)));
        }
 
+RSA *d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa)
+       {
+       return((RSA *)ASN1_d2i_fp((char *(*)())
+               RSA_new,(char *(*)())d2i_RSA_PUBKEY, (fp),
+               (unsigned char **)(rsa)));
+       }
+
 int i2d_RSAPublicKey_fp(FILE *fp, RSA *rsa)
        {
        return(ASN1_i2d_fp(i2d_RSAPublicKey,fp,(unsigned char *)rsa));
        }
+
+int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa)
+       {
+       return(ASN1_i2d_fp(i2d_RSA_PUBKEY,fp,(unsigned char *)rsa));
+       }
 #endif
 
 RSA *d2i_RSAPrivateKey_bio(BIO *bp, RSA **rsa)
@@ -310,10 +322,22 @@ RSA *d2i_RSAPublicKey_bio(BIO *bp, RSA **rsa)
                (unsigned char **)(rsa)));
        }
 
+RSA *d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa)
+       {
+       return((RSA *)ASN1_d2i_bio((char *(*)())
+               RSA_new,(char *(*)())d2i_RSA_PUBKEY, (bp),
+               (unsigned char **)(rsa)));
+       }
+
 int i2d_RSAPublicKey_bio(BIO *bp, RSA *rsa)
        {
        return(ASN1_i2d_bio(i2d_RSAPublicKey,bp,(unsigned char *)rsa));
        }
+
+int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa)
+       {
+       return(ASN1_i2d_bio(i2d_RSA_PUBKEY,bp,(unsigned char *)rsa));
+       }
 #endif
 
 #ifndef NO_DSA
@@ -330,16 +354,16 @@ int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa)
        return(ASN1_i2d_fp(i2d_DSAPrivateKey,fp,(unsigned char *)dsa));
        }
 
-DSA *d2i_DSAPublicKey_fp(FILE *fp, DSA **dsa)
+DSA *d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa)
        {
        return((DSA *)ASN1_d2i_fp((char *(*)())
-               DSA_new,(char *(*)())d2i_DSAPublicKey, (fp),
+               DSA_new,(char *(*)())d2i_DSA_PUBKEY, (fp),
                (unsigned char **)(dsa)));
        }
 
-int i2d_DSAPublicKey_fp(FILE *fp, DSA *dsa)
+int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa)
        {
-       return(ASN1_i2d_fp(i2d_DSAPublicKey,fp,(unsigned char *)dsa));
+       return(ASN1_i2d_fp(i2d_DSA_PUBKEY,fp,(unsigned char *)dsa));
        }
 #endif
 
@@ -355,16 +379,16 @@ int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa)
        return(ASN1_i2d_bio(i2d_DSAPrivateKey,bp,(unsigned char *)dsa));
        }
 
-DSA *d2i_DSAPublicKey_bio(BIO *bp, DSA **dsa)
+DSA *d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa)
        {
        return((DSA *)ASN1_d2i_bio((char *(*)())
-               DSA_new,(char *(*)())d2i_DSAPublicKey, (bp),
+               DSA_new,(char *(*)())d2i_DSA_PUBKEY, (bp),
                (unsigned char **)(dsa)));
        }
 
-int i2d_DSAPublicKey_bio(BIO *bp, DSA *dsa)
+int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa)
        {
-       return(ASN1_i2d_bio(i2d_DSAPublicKey,bp,(unsigned char *)dsa));
+       return(ASN1_i2d_bio(i2d_DSA_PUBKEY,bp,(unsigned char *)dsa));
        }
 
 #endif