mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
c0452248ea
X509_STORE_add_cert and X509_STORE_add_crl are changed to return success if the object to be added was already found in the store, rather than returning an error. Raise errors if empty or malformed files are read when loading certificates and CRLs. Remove NULL checks and allow a segv to occur. Add error handing for all calls to X509_STORE_add_c{ert|tl} Refactor these two routines into one. Bring the unit test for duplicate certificates up to date using the test framework. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2830)
20 lines
660 B
Raku
20 lines
660 B
Raku
#! /usr/bin/env perl
|
|
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
|
#
|
|
# Licensed under the OpenSSL license (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
|
|
#
|
|
# ======================================================================
|
|
# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
|
|
|
|
|
|
use OpenSSL::Test qw/:DEFAULT srctop_file/;
|
|
|
|
setup("test_x509_dup_cert");
|
|
|
|
plan tests => 1;
|
|
|
|
ok(run(test(["x509_dup_cert_test", srctop_file("test", "certs", "leaf.pem")])));
|