diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-02-22 00:58:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-03-15 19:15:55 +0300 |
commit | a791b1ce0fa2bc9859474fb6f7a9c0ff8cbd1d4a (patch) | |
tree | 3c9823a54e6e28a8c8f9fb281d82ad2a67c117ba /tests/auth | |
parent | 755a99a7ebf24e00675e2f2e0f5184825ad74c4a (diff) |
Port test.sh to testscript
Diffstat (limited to 'tests/auth')
-rwxr-xr-x | tests/auth/cert | 36 | ||||
-rw-r--r-- | tests/auth/default-cert-fp | 1 | ||||
-rw-r--r-- | tests/auth/default-cert.pem | 30 | ||||
-rw-r--r-- | tests/auth/default-openssl.cnf | 22 | ||||
-rw-r--r-- | tests/auth/expired-cert.pem | 30 | ||||
-rw-r--r-- | tests/auth/key.pem | 51 | ||||
-rw-r--r-- | tests/auth/mismatch-cert.pem | 31 | ||||
-rw-r--r-- | tests/auth/mismatch-openssl.cnf | 22 | ||||
-rw-r--r-- | tests/auth/noemail-cert.pem | 30 | ||||
-rw-r--r-- | tests/auth/noemail-openssl.cnf | 20 |
10 files changed, 273 insertions, 0 deletions
diff --git a/tests/auth/cert b/tests/auth/cert new file mode 100755 index 0000000..41b3b9c --- /dev/null +++ b/tests/auth/cert @@ -0,0 +1,36 @@ +#! /bin/sh + +# Normally, you don't need to regenerate the private key. +# +# openssl genrsa 4096 > key.pem + +openssl req -x509 -new -key key.pem -days 1825 -config default-openssl.cnf > \ + default-cert.pem + +cat default-cert.pem | openssl x509 -sha256 -noout -fingerprint | \ + sed -n 's/^SHA256 Fingerprint=\(.*\)$/\1/p' >default-cert-fp + +openssl req -x509 -new -key key.pem -days 1825 -config mismatch-openssl.cnf > \ + mismatch-cert.pem + +openssl req -x509 -new -key key.pem -days 1825 -config noemail-openssl.cnf > \ + noemail-cert.pem + +# Normally, you have no reason to regenerate expired-cert.pem, as need to keep +# it expired for the testing purposes. But if you do, copy expired-cert.pem +# content to the certificate value of the following manifest files: +# ../rep-auth/expired/repositories +# +# To regenerate the packages and signature manifest files run bpkg rep-create +# command, for example: +# +# ../../bpkg/bpkg rep-create ../rep-auth/expired --key key.pem +# +# We cannot do it in the testscript since the certificate has expired. This is +# also the reason why we store these auto-generated manifests in git. +# +# Will have to wait 1 day until the certificate expires. Until then testscript +# will be failing. +# +# openssl req -x509 -new -key key.pem -days 1 -config default-openssl.cnf > \ +# expired-cert.pem diff --git a/tests/auth/default-cert-fp b/tests/auth/default-cert-fp new file mode 100644 index 0000000..11ebf3a --- /dev/null +++ b/tests/auth/default-cert-fp @@ -0,0 +1 @@ +AB:0D:3F:C1:B0:13:E4:0E:AD:4A:08:06:AE:F3:85:DB:E2:27:5F:83:11:47:A2:78:64:3C:73:60:F8:66:3A:A4 diff --git a/tests/auth/default-cert.pem b/tests/auth/default-cert.pem new file mode 100644 index 0000000..34a39f9 --- /dev/null +++ b/tests/auth/default-cert.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFLzCCAxegAwIBAgIJAKroQKG400AsMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV +BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN +MTcwMzA3MDk1NjExWhcNMjIwMzA2MDk1NjExWjAzMRcwFQYDVQQKDA5Db2RlIFN5 +bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+ +IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP +PR58SFNwwd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH +4O3aL2HB0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXN +C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O4Jy9nevMom7Hx6F+q/3vU25+NuSvupMqJB3/MuBJl9RNcQ3mcwber8l +cZNTUVoM/YQ1DwPqLmXobRNxUuqnRtaIEDoWKXNCzhFsMMFA9SJBrEaKDRAuzrxE +B7GWDvwwpnoKvTooz0g1/CJbPd7qrnAqhHzBZBe7Ux8dTJc62FKNhNn0TSZxIXhS +nqyCIjDkxJHGaTIoe32tsNxmM1JdRqJUcXHuq6vlFOfHFeI= +-----END CERTIFICATE----- diff --git a/tests/auth/default-openssl.cnf b/tests/auth/default-openssl.cnf new file mode 100644 index 0000000..c14ec06 --- /dev/null +++ b/tests/auth/default-openssl.cnf @@ -0,0 +1,22 @@ +repository = build2.org +company = Code Synthesis +email = info@build2.org + + +[ req ] + +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no +utf8 = yes + +[ req_distinguished_name ] + +O = $company +CN = name:$repository + +[ v3_req ] + +keyUsage = critical,digitalSignature +extendedKeyUsage = critical,codeSigning +subjectAltName = email:$email diff --git a/tests/auth/expired-cert.pem b/tests/auth/expired-cert.pem new file mode 100644 index 0000000..3dbbe91 --- /dev/null +++ b/tests/auth/expired-cert.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFLzCCAxegAwIBAgIJAOx1KvcHxv3GMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV +BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN +MTcwMzAxMTcwMTI0WhcNMTcwMzAyMTcwMTI0WjAzMRcwFQYDVQQKDA5Db2RlIFN5 +bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+ +IfdyjGMu34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNP +PR58SFNwwd2E6C8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VpYv4uVII47eJk4a8XRGj0d+7b +nuFfT4d6gACN3gfOmtd12uT7dNsn5q0fkGhzR4ppDIyTJpGA8UhHETTRPL+HFcb1 +6kXnRPFS7eoF9DoSGtBhdpRUefj8EPJWhfE7xQvMDTYIE/ccBWp173F+xShr2mgF +xDkHH+vXGFzUZXSEAF2NW9U3bf4bRQpdOkYJsvHJmLYjcGNKdkHjJVWdXmoRpbsR +IC8M7ZPp+/oV5JEinCXRsT1NN+7l8rkec9hNk5sbokVCcyYv+GxL8kRFt2jyLqny +RlM2vM3uhgJNYVSlYsgjjg4QfikV6s+QawjSVi6y4ZnHEho= +-----END CERTIFICATE----- diff --git a/tests/auth/key.pem b/tests/auth/key.pem new file mode 100644 index 0000000..6615a2d --- /dev/null +++ b/tests/auth/key.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+IfdyjGMu +34GsUG51WzhcNOmNdLX2FHEiiESAPvVbWOEO+ZQL3IIxbXc8IgiNEpNPPR58SFNw +wd2E6C8pmyN7QhXuy+gpVdwbsN9RWXnXBY9A9JtSt+xBuxeDs/PkdoPH4O3aL2HB +0TUzTPhHZ23BCSzMXIIqJfxEX2g9eKtPPkRMsLd/X0lRqkutjmXlnKXNCJ8uE8yU +cuWtPSfsqSiEfvBpfcrJ4trQzYgiXfNp4Cy434SsVV5wB2Uki9fTRy2HY478bHLT +2wgqVqCLartkOKTawy8bx0C/uA1mxen4U6P9dcKI4j1/oPmiykl0r0HlQIAGOYZz +xbk52/pkt7LlSLvqW4jtyIhM4p8CgSRvIyI0eJHEt0ztoB6LN1zAdThubomWaImT +xTLJXzl/fea8JJ+6jsP4NBiIrrnT/HBF1MUEiqLfwjAwTraBPtqH8A6aI+yGPsWP +AhTtlYeyTKv2qkTFA4QolegtkmjWt/oxFzwCwnLPrN19CFPUFPOGiA1+u7jGNUzp +9KuNFQXfiay5ZzP8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k8ps006a0cNdbrwD3Fhia30DLvCJPRCrKnNLscz0nLs5BdG +nVNW95xvfUf7+ha1YizIuVttO8cFTSpxAoIBAET0kO0jKwSYzBBJBMWHlAmYfaiW +WUUYAYpk2jHaK8L4QSNZOvBIEovMCdNN9+D8yQ09HGMxny5+MkSF9CaRRdC1MFfg +bZVlmC+UlzeuMEHalrYVWmIQ29KsF7vo9dKBz1BHMQ77D4lzaV1fZ9EPg+XbbNG2 +6N/rC8ubuC4CjnqMCO0tFM+Gq6ixzDmBkzEWYStEwMQVIkfJ/BxVFHyH8DsRDmvO +1u3lZ7Ks0HyiSOe45q/E6PnNV+oV6f1EeZESZysuD96fHm8XMC6iBwK0AQ0hUZ4e +cVzIsHBEMzLJx6On7xQYR7FNmdW+8fJmMXyniCUS9c26upTNwWVDX+U4Y4M= +-----END RSA PRIVATE KEY----- diff --git a/tests/auth/mismatch-cert.pem b/tests/auth/mismatch-cert.pem new file mode 100644 index 0000000..785e094 --- /dev/null +++ b/tests/auth/mismatch-cert.pem @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFTzCCAzegAwIBAgIJAO7DtVrDDUcXMA0GCSqGSIb3DQEBCwUAMEMxFzAVBgNV +BAoMDkNvZGUgU3ludGhlc2lzMSgwJgYDVQQDDB9uYW1lOmJ1aWxkMi5vcmcvbWlz +bWF0Y2hlZC9uYW1lMB4XDTE3MDMwNzA5NTYxMVoXDTIyMDMwNjA5NTYxMVowQzEX +MBUGA1UECgwOQ29kZSBTeW50aGVzaXMxKDAmBgNVBAMMH25hbWU6YnVpbGQyLm9y +Zy9taXNtYXRjaGVkL25hbWUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQDau/El7sxcwjKBVNUZ8xHgH8xNFFGBsp0txdpRu74h93KMYy7fgaxQbnVbOFw0 +6Y10tfYUcSKIRIA+9VtY4Q75lAvcgjFtdzwiCI0Sk089HnxIU3DB3YToLymbI3tC +Fe7L6ClV3Buw31FZedcFj0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+/UWieX8k/aqcnD +DeLvcEjuh+amLSapYlYrhMGal615PIbsi3eAJJz5ZDS8oUuev9NcuU57rBNqUNbz +UV8hMHGsD7ej8Tu+XeEgIBmBY6Bke1M6VU00Bt3xW0bH9yaEa0RWSflyfQfX4WGA +Ukl/CzI3IVxqO8TXDJ5ww0NOdzl9PkQV5HwzDiukutkrvGumUDzu5zkvSyDPGauO +/xmojCNSGuGYAI1bQnJjLtnKOxJgrHxTsiNCznOCXePr9+/UcoIQ6nyrHwi37/ze +8hMr+XqSi4IaPRAjSsj8b6IVVg== +-----END CERTIFICATE----- diff --git a/tests/auth/mismatch-openssl.cnf b/tests/auth/mismatch-openssl.cnf new file mode 100644 index 0000000..0c328d0 --- /dev/null +++ b/tests/auth/mismatch-openssl.cnf @@ -0,0 +1,22 @@ +repository = build2.org/mismatched/name +company = Code Synthesis +email = info@build2.org + + +[ req ] + +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no +utf8 = yes + +[ req_distinguished_name ] + +O = $company +CN = name:$repository + +[ v3_req ] + +keyUsage = critical,digitalSignature +extendedKeyUsage = critical,codeSigning +subjectAltName = email:$email diff --git a/tests/auth/noemail-cert.pem b/tests/auth/noemail-cert.pem new file mode 100644 index 0000000..420c195 --- /dev/null +++ b/tests/auth/noemail-cert.pem @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFEzCCAvugAwIBAgIJALnZEjzzFueMMA0GCSqGSIb3DQEBCwUAMDMxFzAVBgNV +BAoMDkNvZGUgU3ludGhlc2lzMRgwFgYDVQQDDA9uYW1lOmJ1aWxkMi5vcmcwHhcN +MTcwMzA3MDk1NjExWhcNMjIwMzA2MDk1NjExWjAzMRcwFQYDVQQKDA5Db2RlIFN5 +bnRoZXNpczEYMBYGA1UEAwwPbmFtZTpidWlsZDIub3JnMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA2rvxJe7MXMIygVTVGfMR4B/MTRRRgbKdLcXaUbu+ +Ifdy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ZcEv/3QBYSaKkwr+9sNqAHpD/UVj7qwRfHYLs1GM6o+d +/bpYz+evSdEu/3lMDxg4CLQtRqElgOnOhvIuziu7qcpgmJpRvYSHJ7RrGQET/fna ++a5KZiYvWVbFQhA79nPBGWvW/Om2dk+/pzn40zcnwnRF8wwNt8ncAI/ZhjLap5qG +5VFoMA/AP+MCsk0at3E4t4VwofdS7WB0KJv2cuGEnLRk7GOP058zOv/QQt2fXgK/ +iO68nn7vfNzVFNfbb6vYzfKigd9JiYn+icfi/cZfB7zbVHzvjS3GEQk+2NVBnnyf +LUTr5k9fTekFR1l1AE8NWi56fJ6W5d/TApkl8uun7CItHL6y2WuLyKhMxAp66LLB +hMfgR3OW4w== +-----END CERTIFICATE----- diff --git a/tests/auth/noemail-openssl.cnf b/tests/auth/noemail-openssl.cnf new file mode 100644 index 0000000..4fc8618 --- /dev/null +++ b/tests/auth/noemail-openssl.cnf @@ -0,0 +1,20 @@ +repository = build2.org +company = Code Synthesis + + +[ req ] + +distinguished_name = req_distinguished_name +x509_extensions = v3_req +prompt = no +utf8 = yes + +[ req_distinguished_name ] + +O = $company +CN = name:$repository + +[ v3_req ] + +keyUsage = critical,digitalSignature +extendedKeyUsage = critical,codeSigning |