Spelling error.
[openssl.git] / crypto / asn1 / x_pkey.c
index 1d4d92612931ab03b4f973069cc183e95c603284..30d8c1df0839174b9cd5e650985df0e6585d0c0f 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "evp.h"
-#include "objects.h"
-#include "asn1_mac.h"
-
-/* ASN1err(ASN1_F_D2I_X509_PKEY,ASN1_R_UNSUPPORTED_CIPHER); */
-/* ASN1err(ASN1_F_X509_PKEY_NEW,ASN1_R_IV_TOO_LARGE); */
+#include <openssl/evp.h>
+#include <openssl/objects.h>
+#include <openssl/asn1_mac.h>
 
 /* need to implement */
-int i2d_X509_PKEY(a,pp)
-X509_PKEY *a;
-unsigned char **pp;
+int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp)
        {
        return(0);
        }
 
-X509_PKEY *d2i_X509_PKEY(a,pp,length)
-X509_PKEY **a;
-unsigned char **pp;
-long length;
+X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, unsigned char **pp, long length)
        {
        int i;
        M_ASN1_D2I_vars(a,X509_PKEY *,X509_PKEY_new);
@@ -91,6 +83,7 @@ long length;
        if (ret->cipher.cipher == NULL)
                {
                c.error=ASN1_R_UNSUPPORTED_CIPHER;
+               c.line=__LINE__;
                goto err;
                }
        if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING) 
@@ -99,6 +92,7 @@ long length;
                if (i > EVP_MAX_IV_LENGTH)
                        {
                        c.error=ASN1_R_IV_TOO_LARGE;
+                       c.line=__LINE__;
                        goto err;
                        }
                memcpy(ret->cipher.iv,
@@ -109,9 +103,10 @@ long length;
        M_ASN1_D2I_Finish(a,X509_PKEY_free,ASN1_F_D2I_X509_PKEY);
        }
 
-X509_PKEY *X509_PKEY_new()
+X509_PKEY *X509_PKEY_new(void)
        {
        X509_PKEY *ret=NULL;
+       ASN1_CTX c;
 
        M_ASN1_New_Malloc(ret,X509_PKEY);
        ret->version=0;
@@ -128,8 +123,7 @@ X509_PKEY *X509_PKEY_new()
        M_ASN1_New_Error(ASN1_F_X509_PKEY_NEW);
        }
 
-void X509_PKEY_free(x)
-X509_PKEY *x;
+void X509_PKEY_free(X509_PKEY *x)
        {
        int i;