-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle spaces in filenames properly.
- Loading branch information
Showing
3 changed files
with
75 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bats | ||
# Copyright 2017 Intel Corporation | ||
|
||
load test_lib | ||
|
||
setup() { | ||
find_clrtrust | ||
setup_fs | ||
cp $CERTS/c1.pem "$CLR_CLEAR_TRUST_SRC/trusted/COMODO RSA Certification Authority.pem" | ||
} | ||
|
||
@test "add, remove files with spaces in names" { | ||
$CLRTRUST generate | ||
cnt=$(ls $STORE/anchors | wc -l) | ||
[ $cnt -eq 2 ] # file and symlink | ||
run $CLRTRUST list | ||
[ $status -eq 0 ] | ||
cnt=$(echo "$output"| grep ^id | wc -l) | ||
[ $cnt -eq 1 ] | ||
# add file with spaces | ||
$CLRTRUST add $CERTS/'Baltimore CyberTrust Root.crt' | ||
run $CLRTRUST list | ||
cnt=$(echo "$output" | grep ^id | wc -l) | ||
[ $cnt -eq 2 ] | ||
$CLRTRUST add $CERTS/c2.pem | ||
run $CLRTRUST list | ||
cnt=$(echo "$output" | grep ^id | wc -l) | ||
[ $cnt -eq 3 ] | ||
$CLRTRUST remove $CERTS/'Baltimore CyberTrust Root.crt' $CERTS/c2.pem | ||
run $CLRTRUST list | ||
cnt=$(echo "$output" | grep ^id | wc -l) | ||
[ $cnt -eq 1 ] | ||
$CLRTRUST remove "$CLR_CLEAR_TRUST_SRC/trusted/COMODO RSA Certification Authority.pem" | ||
run $CLRTRUST list | ||
cnt=$(echo "$output" | grep ^id | wc -l) | ||
[ $cnt -eq 0 ] | ||
} | ||
|
||
teardown() { | ||
true | ||
#remove_fs | ||
} | ||
|
||
# vim: ft=sh:sw=4:ts=4:et:tw=80:si:noai:nocin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ | ||
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYD | ||
VQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoX | ||
DTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9y | ||
ZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVy | ||
VHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKr | ||
mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjr | ||
IZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeK | ||
mpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSu | ||
XmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy | ||
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/ye | ||
jl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1 | ||
BE3wMBI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