mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-04 17:00:11 -05:00
tests improvements
This commit is contained in:
parent
72de045151
commit
180b352102
47
tests/certs/ca-bundle.crt
Normal file
47
tests/certs/ca-bundle.crt
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
# Certum Trusted Network CA
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBM
|
||||||
|
MSIwIAYDVQQKExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5D
|
||||||
|
ZXJ0dW0gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBU
|
||||||
|
cnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIyMTIwNzM3WhcNMjkxMjMxMTIwNzM3
|
||||||
|
WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMg
|
||||||
|
Uy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MSIw
|
||||||
|
IAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0B
|
||||||
|
AQEFAAOCAQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rH
|
||||||
|
UV+rpDKmYYe2bg+G0jACl/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LM
|
||||||
|
TXPb865Px1bVWqeWifrzq2jUI4ZZJ88JJ7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVU
|
||||||
|
BBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4fOQtf/WsX+sWn7Et0brM
|
||||||
|
kUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0cvW0QM8x
|
||||||
|
AcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNV
|
||||||
|
HRMBAf8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNV
|
||||||
|
HQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15y
|
||||||
|
sHhE49wcrwn9I0j6vSrEuVUEtRCjjSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfL
|
||||||
|
I9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1mS1FhIrlQgnXdAIv94nYmem8
|
||||||
|
J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5ajZt3hrvJBW8qY
|
||||||
|
VoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
|
||||||
|
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
|
||||||
|
# DigiCert Assured ID Root CA
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBl
|
||||||
|
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
||||||
|
d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJv
|
||||||
|
b3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzExMTEwMDAwMDAwWjBlMQswCQYDVQQG
|
||||||
|
EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNl
|
||||||
|
cn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pFL6Lw8g==
|
||||||
|
-----END CERTIFICATE-----
|
@ -37,6 +37,7 @@ for file in ${script_path}/../logs/notsigned/*.*
|
|||||||
-sigin "sign_$format_nr.der" \
|
-sigin "sign_$format_nr.der" \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "notsigned/$name" -out "test_$number.$ext"
|
-in "notsigned/$name" -out "test_$number.$ext"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ for file in ${script_path}/../logs/notsigned/*.*
|
|||||||
-sigin "sign_$format_nr.pem" \
|
-sigin "sign_$format_nr.pem" \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "notsigned/$name" -out "test_$number.$ext"
|
-in "notsigned/$name" -out "test_$number.$ext"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ for file in ${script_path}/../logs/notsigned/*.*
|
|||||||
-sigin "sign_$format_nr.pem" \
|
-sigin "sign_$format_nr.pem" \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "signed_$number.$ext" -out "test_$number.$ext"
|
-in "signed_$number.$ext" -out "test_$number.$ext"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ for file in ${script_path}/../logs/notsigned/*.*
|
|||||||
-nest \
|
-nest \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "signed_$number.$ext" -out "test_$number.$ext"
|
-in "signed_$number.$ext" -out "test_$number.$ext"
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
printf("Hello world!\n");
|
printf("Hello world!");
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ modify_blob() {
|
|||||||
../../osslsigncode verify \
|
../../osslsigncode verify \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "changed_$1.$2" 2>> "verify.log" 1>&2
|
-in "changed_$1.$2" 2>> "verify.log" 1>&2
|
||||||
result=$?
|
result=$?
|
||||||
|
|
||||||
@ -97,6 +98,7 @@ verify_signature() {
|
|||||||
../../osslsigncode verify \
|
../../osslsigncode verify \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-in "test_tmp.tmp" 2>> "verify.log" 1>&2'
|
-in "test_tmp.tmp" 2>> "verify.log" 1>&2'
|
||||||
result=$?
|
result=$?
|
||||||
rm -f "test_tmp.tmp"
|
rm -f "test_tmp.tmp"
|
||||||
@ -107,7 +109,7 @@ verify_signature() {
|
|||||||
result=$?
|
result=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$result" -eq 0 -a "$8" == "MODIFY"
|
if test "$result" -eq 0 -a "$8" = "MODIFY"
|
||||||
then
|
then
|
||||||
modify_blob "$2" "$3" "$7"
|
modify_blob "$2" "$3" "$7"
|
||||||
result=$?
|
result=$?
|
||||||
@ -154,6 +156,7 @@ verify_leaf_hash() {
|
|||||||
../../osslsigncode verify \
|
../../osslsigncode verify \
|
||||||
-CAfile "${script_path}/../certs/CACert.pem" \
|
-CAfile "${script_path}/../certs/CACert.pem" \
|
||||||
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
-CRLfile "${script_path}/../certs/CACertCRL.pem" \
|
||||||
|
-TSA-CAfile "${script_path}/../certs/ca-bundle.crt" \
|
||||||
-require-leaf-hash SHA256:$(sha256sum "${script_path}/../certs/cert.der" | cut -d" " -f1) \
|
-require-leaf-hash SHA256:$(sha256sum "${script_path}/../certs/cert.der" | cut -d" " -f1) \
|
||||||
-in "test_tmp.tmp" 2>> "verify.log" 1>&2'
|
-in "test_tmp.tmp" 2>> "verify.log" 1>&2'
|
||||||
result=$?
|
result=$?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user