-/* $OpenBSD: x509_set.c,v 1.28 2024/03/26 22:44:57 tb Exp $ */
+/* $OpenBSD: x509_set.c,v 1.29 2024/03/26 23:21:36 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
X509_set_version(X509 *x, long version)
{
if (x == NULL)
- return (0);
+ return 0;
/*
* RFC 5280, 4.1: versions 1 - 3 are specified as follows.
* Version ::= INTEGER { v1(0), v2(1), v3(2) }
*/
if (version < 0 || version > 2)
- return (0);
+ return 0;
if (x->cert_info->version == NULL) {
if ((x->cert_info->version = ASN1_INTEGER_new()) == NULL)
- return (0);
+ return 0;
}
x->cert_info->enc.modified = 1;
- return (ASN1_INTEGER_set(x->cert_info->version, version));
+ return ASN1_INTEGER_set(x->cert_info->version, version);
}
LCRYPTO_ALIAS(X509_set_version);