/*
- * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* 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
ASN1_BIT_STRING *key = ASN1_BIT_STRING_new();
ASN1_INTEGER *serial = ASN1_INTEGER_new();
- if (!X509_NAME_add_entry_by_NID(name, NID_commonName, MBSTRING_ASC,
- namestr, -1, -1, 1)
- || !ASN1_BIT_STRING_set(key, keybytes, sizeof(keybytes))
- || !ASN1_INTEGER_set_uint64(serial, (uint64_t)1))
+ if (!TEST_ptr(name)
+ || !TEST_ptr(key)
+ || !TEST_ptr(serial)
+ || !TEST_true(X509_NAME_add_entry_by_NID(name, NID_commonName,
+ MBSTRING_ASC,
+ namestr, -1, -1, 1))
+ || !TEST_true(ASN1_BIT_STRING_set(key, keybytes, sizeof(keybytes)))
+ || !TEST_true(ASN1_INTEGER_set_uint64(serial, (uint64_t)1)))
goto err;
cid = OCSP_cert_id_new(EVP_sha256(), name, key, serial);
if (!TEST_ptr(bs)
static int test_ocsp_url_svcloc_new(void)
{
- static const char * urls[] = {
+ static const char *urls[] = {
"www.openssl.org",
"www.openssl.net",
NULL
};
X509 *issuer = NULL;
- X509_EXTENSION * ext = NULL;
+ X509_EXTENSION *ext = NULL;
int ret = 0;
if (!TEST_true(get_cert(&issuer)))
int setup_tests(void)
{
+ if (!test_skip_common_options()) {
+ TEST_error("Error parsing test options\n");
+ return 0;
+ }
+
if (!TEST_ptr(certstr = test_get_argument(0))
|| !TEST_ptr(privkeystr = test_get_argument(1)))
return 0;