Rewrite PBE handling read to support PKCS#5 v2.0 and update the function
[openssl.git] / crypto / x509 / x509_r2x.c
index 2d8721306cde1e5240f9d82f9d68ef9c9f581473..bb4697ae60d43d95d490ad3b8b038c4e70174488 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "bn.h"
-#include "evp.h"
-#include "asn1.h"
-#include "x509.h"
-#include "objects.h"
-#include "buffer.h"
-#include "pem.h"
+#include <openssl/bn.h>
+#include <openssl/evp.h>
+#include <openssl/asn1.h>
+#include <openssl/x509.h>
+#include <openssl/objects.h>
+#include <openssl/buffer.h>
 
-X509 *X509_REQ_to_X509(r,days,pkey)
-X509_REQ *r;
-int days;
-EVP_PKEY *pkey;
+X509 *X509_REQ_to_X509(X509_REQ *r, int days, EVP_PKEY *pkey)
        {
        X509 *ret=NULL;
        X509_CINF *xi=NULL;
@@ -84,7 +80,7 @@ EVP_PKEY *pkey;
        /* duplicate the request */
        xi=ret->cert_info;
 
-       if (sk_num(r->req_info->attributes) != 0)
+       if (sk_X509_ATTRIBUTE_num(r->req_info->attributes) != 0)
                {
                if ((xi->version=ASN1_INTEGER_new()) == NULL) goto err;
                if (!ASN1_INTEGER_set(xi->version,2)) goto err;