Debian Codegraph @

crt/s2n/tests/pems/crl/test_s2nc.sh

raw symbols SCIP
1 #!/bin/bash
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15
16 # Ensure that s2nc accepts all generated certificates
17
18 s2nc_path="../../../bin/s2nc"
19 s2nd_path="../../../bin/s2nd"
20
21 cert_chains=("none_revoked" "leaf_revoked" "intermediate_revoked" "all_revoked")
22
23 for cert_chain in "${cert_chains[@]}"; do
24 "${s2nd_path}" \
25 --self-service-blinding \
26 --negotiate \
27 --cert "${cert_chain}_cert_chain.pem" \
28 --key "${cert_chain}_key.pem" \
29 localhost 8888 &
30 s2nd_pid=$!
31
32 "${s2nc_path}" \
33 --ca-file "root_cert.pem" \
34 localhost 8888
35 s2nc_success=$?
36
37 kill ${s2nd_pid}
38
39 if [ ${s2nc_success} -ne 0 ]; then
40 exit 1
41 fi
42 done