Update OCSP API.
[oweals/openssl.git] / crypto / asn1 / d2i_pu.c
index eb572acb0f3a1bf5783c2d8a26441cde9580cc1e..9eedde3de4168fa84e07e3c84de3bc4d532c50d2 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "bn.h"
-#include "evp.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/bn.h>
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/asn1.h>
 
-EVP_PKEY *d2i_PublicKey(type,a,pp,length)
-int type;
-EVP_PKEY **a;
-unsigned char **pp;
-long length;
+EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
+            long length)
        {
        EVP_PKEY *ret;
 
@@ -87,7 +84,8 @@ long length;
                {
 #ifndef NO_RSA
        case EVP_PKEY_RSA:
-               if ((ret->pkey.rsa=d2i_RSAPublicKey(NULL,pp,length)) == NULL)
+               if ((ret->pkey.rsa=d2i_RSAPublicKey(NULL,
+                       (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
                        {
                        ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);
                        goto err;
@@ -96,7 +94,8 @@ long length;
 #endif
 #ifndef NO_DSA
        case EVP_PKEY_DSA:
-               if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,pp,length)) == NULL)
+               if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,
+                       (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
                        {
                        ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);
                        goto err;