/*
* Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
*
- * Licensed under the OpenSSL license (the "License"). You may not use
+ * Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
#include <stdio.h>
#include "internal/cryptlib.h"
-#include "e_os.h"
+#include "internal/refcount.h"
#include <openssl/asn1.h>
#include <openssl/objects.h>
#include <openssl/evp.h>
int X509_set_version(X509 *x, long version)
{
if (x == NULL)
- return (0);
+ return 0;
if (version == 0) {
ASN1_INTEGER_free(x->cert_info.version);
x->cert_info.version = NULL;
- return (1);
+ return 1;
}
if (x->cert_info.version == NULL) {
if ((x->cert_info.version = ASN1_INTEGER_new()) == NULL)
- return (0);
+ return 0;
}
- return (ASN1_INTEGER_set(x->cert_info.version, version));
+ return ASN1_INTEGER_set(x->cert_info.version, version);
}
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial)
int X509_set_issuer_name(X509 *x, X509_NAME *name)
{
if (x == NULL)
- return (0);
- return (X509_NAME_set(&x->cert_info.issuer, name));
+ return 0;
+ return X509_NAME_set(&x->cert_info.issuer, name);
}
int X509_set_subject_name(X509 *x, X509_NAME *name)
{
if (x == NULL)
- return (0);
- return (X509_NAME_set(&x->cert_info.subject, name));
+ return 0;
+ return X509_NAME_set(&x->cert_info.subject, name);
}
int x509_set1_time(ASN1_TIME **ptm, const ASN1_TIME *tm)
int X509_set_pubkey(X509 *x, EVP_PKEY *pkey)
{
if (x == NULL)
- return (0);
- return (X509_PUBKEY_set(&(x->cert_info.key), pkey));
+ return 0;
+ return X509_PUBKEY_set(&(x->cert_info.key), pkey);
}
int X509_up_ref(X509 *x)