#include <stdio.h>
#include "cryptlib.h"
-#include "asn1.h"
-#include "objects.h"
-#include "evp.h"
-#include "x509.h"
+#include <openssl/asn1.h>
+#include <openssl/objects.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
-int X509_set_version(x,version)
-X509 *x;
-long version;
+int X509_set_version(X509 *x, long version)
{
if (x == NULL) return(0);
if (x->cert_info->version == NULL)
return(ASN1_INTEGER_set(x->cert_info->version,version));
}
-int X509_set_serialNumber(x,serial)
-X509 *x;
-ASN1_INTEGER *serial;
+int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial)
{
ASN1_INTEGER *in;
return(in != NULL);
}
-int X509_set_issuer_name(x,name)
-X509 *x;
-X509_NAME *name;
+int X509_set_issuer_name(X509 *x, X509_NAME *name)
{
if ((x == NULL) || (x->cert_info == NULL)) return(0);
return(X509_NAME_set(&x->cert_info->issuer,name));
}
-int X509_set_subject_name(x,name)
-X509 *x;
-X509_NAME *name;
+int X509_set_subject_name(X509 *x, X509_NAME *name)
{
if ((x == NULL) || (x->cert_info == NULL)) return(0);
return(X509_NAME_set(&x->cert_info->subject,name));
}
-int X509_set_notBefore(x,tm)
-X509 *x;
-ASN1_UTCTIME *tm;
+int X509_set_notBefore(X509 *x, ASN1_UTCTIME *tm)
{
ASN1_UTCTIME *in;
return(in != NULL);
}
-int X509_set_notAfter(x,tm)
-X509 *x;
-ASN1_UTCTIME *tm;
+int X509_set_notAfter(X509 *x, ASN1_UTCTIME *tm)
{
ASN1_UTCTIME *in;
return(in != NULL);
}
-int X509_set_pubkey(x,pkey)
-X509 *x;
-EVP_PKEY *pkey;
+int X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
{
if ((x == NULL) || (x->cert_info == NULL)) return(0);
return(X509_PUBKEY_set(&(x->cert_info->key),pkey));