diff --git a/.gitignore b/.gitignore index 01f9707..eb9b47a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,13 @@ go.work .vscode/launch.json build/* lotw-trust -test.sh +# Testcases tree +testcases/results/* +testcases/keys/cache/chain/*.der +!testcases/keys/cache/chain/mockup.der +testcases/keys/cache/*.der +testcases/**/*.old + +# This, surprisingly, goes last. +!.gitkeep diff --git a/README.md b/README.md index 7b6b80f..44f9580 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,9 @@ This is a [Go](https://go.dev/) program, so this should be easy enough, provided go install github.com/Mihara/lotw-trust@latest -It was written with go 1.20.5 and I currently don't know what's the minimum version requirement. Binaries for a number of platforms are provided in the releases section. +It was written with go 1.20.5 and I currently don't know what's the minimum version requirement. Binaries for a number of platforms are provided in the releases section. `build.sh` will cross-compile binaries for all supported platforms. + +See `testcases` and `test.sh` for simple test cases and a faux-LoTW certification tree structure to play with. ## Plans for future development diff --git a/main.go b/main.go index d6b6d58..0e81a67 100644 --- a/main.go +++ b/main.go @@ -268,7 +268,7 @@ func main() { rootFiles, _ = os.ReadDir(rootsCacheDir) for _, f := range rootFiles { if strings.HasSuffix(strings.ToLower(f.Name()), ".der") { - der, err := dataFiles.ReadFile(filepath.Join(rootsCacheDir, f.Name())) + der, err := os.ReadFile(filepath.Join(rootsCacheDir, f.Name())) check(err, "Failed to read a root certificate from cache.") crt, err := x509.ParseCertificate(der) check(err, "Failed to parse a root certificate from cache.") diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..88edc68 --- /dev/null +++ b/test.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# This is a preliminary smoke test engine, and not a proper integration test framework. +# Yet. It lets people run tests without ever touching their real key file though. + +CACHE=testcases/keys/cache +KEY=testcases/keys/N0CALL.p12 +SRC=testcases/files +DST=testcases/results + +# Straightforward signature. +go run *.go sign -c $CACHE -p changeme $KEY $SRC/sstv.jpg $DST/sstv-signed.jpg +go run *.go verify -c $CACHE $DST/sstv-signed.jpg $DST/sstv-unsigned.jpg +cmp -l $SRC/sstv.jpg $DST/sstv-unsigned.jpg + +# Uncompressed signature. +go run *.go sign -c $CACHE -p changeme -u -a $KEY $SRC/sstv.jpg $DST/sstv-signed-unc.jpg +go run *.go verify -c $CACHE $DST/sstv-signed-unc.jpg $DST/sstv-unsigned.jpg +cmp -l $SRC/sstv.jpg $DST/sstv-unsigned.jpg + +# Text mode signing. +go run *.go sign -t -c $CACHE -p changeme $KEY $SRC/lipsum.txt $DST/lipsum-signed.txt +go run *.go verify -t -c $CACHE $DST/lipsum-signed.txt $DST/lipsum-unsigned.txt diff --git a/testcases/files/lipsum.txt b/testcases/files/lipsum.txt new file mode 100644 index 0000000..15dac90 --- /dev/null +++ b/testcases/files/lipsum.txt @@ -0,0 +1,10 @@ +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Imperdiet massa tincidunt nunc pulvinar sapien et ligula. Enim facilisis gravida neque convallis a cras semper. Viverra maecenas accumsan lacus vel facilisis volutpat est. Nunc sed velit dignissim sodales ut eu sem. Tellus integer feugiat scelerisque varius morbi. Nec nam aliquam sem et tortor consequat. Urna porttitor rhoncus dolor purus. Ac ut consequat semper viverra. Amet venenatis urna cursus eget nunc scelerisque viverra mauris. Tortor condimentum lacinia quis vel eros. Tellus cras adipiscing enim eu turpis egestas pretium aenean. Duis convallis convallis tellus id interdum. Varius duis at consectetur lorem donec massa sapien faucibus et. Aenean euismod elementum nisi quis eleifend quam adipiscing. Nibh sit amet commodo nulla facilisi nullam. Sit amet purus gravida quis blandit. Nullam vehicula ipsum a arcu cursus vitae congue mauris. + +Dui accumsan sit amet nulla. Nunc sed blandit libero volutpat sed cras ornare arcu dui. Tellus at urna condimentum mattis pellentesque id nibh tortor. Magna sit amet purus gravida quis blandit turpis cursus in. Non curabitur gravida arcu ac tortor dignissim convallis aenean. Sed risus ultricies tristique nulla. Varius duis at consectetur lorem donec massa sapien. Lobortis feugiat vivamus at augue eget arcu dictum varius duis. Netus et malesuada fames ac turpis egestas integer. Lectus magna fringilla urna porttitor rhoncus dolor. Dignissim cras tincidunt lobortis feugiat vivamus at. Non odio euismod lacinia at quis. Praesent elementum facilisis leo vel fringilla. + +At tempor commodo ullamcorper a lacus. Sit amet massa vitae tortor condimentum lacinia quis vel eros. Non blandit massa enim nec. Tortor at risus viverra adipiscing at. Nulla pellentesque dignissim enim sit amet venenatis urna cursus. Eget lorem dolor sed viverra ipsum nunc. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Accumsan in nisl nisi scelerisque eu. At quis risus sed vulputate odio ut enim blandit. Dictum varius duis at consectetur lorem donec massa. Ultrices dui sapien eget mi proin sed. Nisl vel pretium lectus quam id leo. Ipsum a arcu cursus vitae congue mauris rhoncus. + +Nisl suscipit adipiscing bibendum est ultricies integer quis auctor elit. Nulla porttitor massa id neque aliquam. Praesent semper feugiat nibh sed pulvinar proin gravida. Interdum velit laoreet id donec. Feugiat in ante metus dictum at tempor. Convallis posuere morbi leo urna molestie at elementum. Netus et malesuada fames ac turpis egestas integer eget aliquet. Gravida cum sociis natoque penatibus et. Amet facilisis magna etiam tempor orci eu lobortis elementum nibh. Tristique nulla aliquet enim tortor. At tellus at urna condimentum mattis pellentesque id nibh tortor. Lectus mauris ultrices eros in. Purus faucibus ornare suspendisse sed nisi lacus sed viverra tellus. Vestibulum lectus mauris ultrices eros in cursus turpis. Pharetra convallis posuere morbi leo urna molestie at elementum. + +Bibendum arcu vitae elementum curabitur vitae. Eu facilisis sed odio morbi quis commodo. Tristique et egestas quis ipsum suspendisse. Eu volutpat odio facilisis mauris sit amet massa vitae tortor. Ultricies integer quis auctor elit. Quis ipsum suspendisse ultrices gravida dictum. Integer malesuada nunc vel risus commodo viverra maecenas accumsan lacus. Eget duis at tellus at urna. Egestas egestas fringilla phasellus faucibus scelerisque eleifend donec pretium vulputate. Turpis egestas maecenas pharetra convallis posuere. Nunc sed id semper risus. Nunc scelerisque viverra mauris in aliquam sem fringilla ut morbi. Id consectetur purus ut faucibus pulvinar. Nisi porta lorem mollis aliquam ut porttitor leo a. Nunc aliquet bibendum enim facilisis gravida neque convallis a cras. Enim eu turpis egestas pretium aenean pharetra magna. Vitae nunc sed velit dignissim sodales. + diff --git a/testcases/files/sstv.jpg b/testcases/files/sstv.jpg new file mode 100644 index 0000000..e8117d5 Binary files /dev/null and b/testcases/files/sstv.jpg differ diff --git a/testcases/generator/README.md b/testcases/generator/README.md new file mode 100644 index 0000000..bbe147d --- /dev/null +++ b/testcases/generator/README.md @@ -0,0 +1,8 @@ +# CA tree generator + +The `generate_keys.sh` script builds a certificate authority structure that looks very much like LoTW's, but isn't, in addition to producing a user certificate for N0CALL. This certificate will not be recognized by `lotw-trust` unless the requisite `mockup.der` files are placed directly into the key cache -- or the key cache is pointed at the directory where they live, `testcases/keys/cache`, with `-c` command line option. This particular stunt makes it possible to use a completely fake certificate authority structure for testing purposes. + +Running this script will wipe the existing structure in `testcases/generator` and start again, so signatures created with keys you had before will stop verifying. + +Generally you shouldn't need to do use this again, unless LoTW does something unusual. + diff --git a/testcases/generator/generate_keys.sh b/testcases/generator/generate_keys.sh new file mode 100644 index 0000000..b96e884 --- /dev/null +++ b/testcases/generator/generate_keys.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +rm root/* intermediate/* user/* + +touch root/index.txt +echo 01 >root/serial +touch intermediate/index.txt +echo 01 >intermediate/serial + +echo === Generating root CA. +openssl genrsa -out root/ca.key.pem 4096 +openssl req -config ./openssl.conf \ + -key root/ca.key.pem \ + -new -x509 -days 7300 -sha512 -extensions v3_ca \ + -out root/ca.cert.pem \ + -subj "/C=US/ST=CT/L=Pseudocity/O=Fake American Radio Relay League/OU=Logbook of the World Mockup/CN=Logbook of the World Root CA Mockup/emailAddress=lotw@example.com" + +echo === Generating Intermediate CA CSR +openssl genrsa -out intermediate/ca.key.pem 2048 +openssl req -config ./openssl.conf -new -sha256 \ + -key intermediate/ca.key.pem \ + -out intermediate/ca.csr.pem \ + -subj "/C=US/ST=CT/L=Pseudocity/O=Fake American Radio Relay League/OU=Logbook of the World Mockup/CN=Logbook of the World Production CA Mockup/emailAddress=lotw@example.com" + +echo === Signing the Intermediate CA CSR with Root CA. +openssl ca -config ./openssl.conf -extensions v3_intermediate_ca \ + -days 6000 -notext -md sha256 -batch \ + -in intermediate/ca.csr.pem \ + -out intermediate/ca.cert.pem + +echo === Generating a callsign CSR. +openssl genrsa -out user/user.key.pem 2048 +openssl req -config ./openssl.conf -new -sha256 \ + -subj "/CN=John Doe/emailAddress=john@example.com/Callsign=N0CALL" \ + -key user/user.key.pem \ + -out user/user.csr.pem + +echo === Signing the callsign CSR with Intermediate CA. +openssl ca -config openssl.conf -name CA_intermediate -batch \ + -extensions user_cert -days 5000 -notext -md sha256 \ + -in user/user.csr.pem \ + -out user/user.cert.pem + +echo === Saving results. + +KEYS=../keys +CACHE=$KEYS/cache + +mkdir -p $CACHE/roots +openssl x509 -in root/ca.cert.pem -outform der -out $CACHE/roots/mockup.der +mkdir -p $CACHE/chain +openssl x509 -in intermediate/ca.cert.pem -outform der -out $CACHE/chain/mockup.der + +# Now the fun part, making a pkcs12 file... +openssl pkcs12 -export -out $KEYS/N0CALL.p12 \ + -password pass:changeme \ + -inkey user/user.key.pem \ + -in user/user.cert.pem \ + -certfile intermediate/ca.cert.pem + +echo === Done! diff --git a/testcases/generator/intermediate/01.pem b/testcases/generator/intermediate/01.pem new file mode 100644 index 0000000..6299d6a --- /dev/null +++ b/testcases/generator/intermediate/01.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID5DCCAsygAwIBAgIBATANBgkqhkiG9w0BAQsFADCBwDELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNUMSkwJwYDVQQKDCBGYWtlIEFtZXJpY2FuIFJhZGlvIFJlbGF5 +IExlYWd1ZTEkMCIGA1UECwwbTG9nYm9vayBvZiB0aGUgV29ybGQgTW9ja3VwMTIw +MAYDVQQDDClMb2dib29rIG9mIHRo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5I00hptCzMRoVo2CSQC +0PeU3f3qb4L00JzmzHEwa6uNyK0FOjPgxKXIOJUnAQsEWPcmR/i4+A== +-----END CERTIFICATE----- diff --git a/testcases/generator/intermediate/ca.cert.pem b/testcases/generator/intermediate/ca.cert.pem new file mode 100644 index 0000000..f0c8412 --- /dev/null +++ b/testcases/generator/intermediate/ca.cert.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgIBATANBgkqhkiG9w0BAQsFADCBzzELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNUMRMwEQYDVQQHDApQc2V1ZG9jaXR5MSkwJwYDVQQKDCBGYWtl +IEFtZXJpY2FuIFJhZGlvIFJlbGF5IExlYWd1ZTEkMCIGA1UECwwbTG9nYm9vayBv +ZiB0aGUgV29ybGQgTW9ja3VwMSwwKgYDVQQDDCNMb2dib29rIG9mIHRoZSBXb3Js +ZCBSb290IENBIE1vY2t1cDEfMB0GCSqGSIb3DQEJARYQbG90d0BleGFtcGxlLmNv +bTAeFw0yMzA2MjIxMDIyMjVaFw0zOTExMjUxMDIyMjVaMIHAMQswCQYDVQQGEwJV +UzELMAkGA1UECAwCQ1QxKTAnBgNVBAoMIEZha2UgQW1lcmljYW4gUmFkaW8gUmVs +YXkgTGVhZ3VlMSQwIgYDVQQLDBtMb2dib29rIG9mIHRoZSBXb3JsZCBNb2NrdXAx +MjAwBgNVBAMMKUxvZ2Jvb2sgb2YgdGhlIFdvcmxkIFByb2R1Y3Rpb24gQ0EgTW9j +a3VwMR8wHQYJKoZIhvcNAQkBFhBsb3R3QGV4YW1wbGUuY29tMIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoFK1iYtdMHbDp3Pe8s+EmGmPUBwpczEhK0l5 +eGzXQz4PGkCEY6fv/qi/WzVSfs6FsKrIHelPmyS4SEwL2jjQQzIxm4II9PGu3yzT +M7un1Y1NY4jENSR2Gs1TxSmjvcMEuniLXdXv41D30ae+i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- diff --git a/testcases/generator/intermediate/ca.csr.pem b/testcases/generator/intermediate/ca.csr.pem new file mode 100644 index 0000000..7f861b3 --- /dev/null +++ b/testcases/generator/intermediate/ca.csr.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIDGzCCAgMCAQAwgdUxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDVDETMBEGA1UE +BwwKUHNldWRvY2l0eTEpMCcGA1UECgwgRmFrZSBBbWVyaWNhbiBSYWRpbyBSZWxh +eSBMZWFndWUxJDAiBgNVBAsMG0xvZ2Jvb2sgb2YgdGhlIFdvcmxkIE1vY2t1cDEy +MDAGA1UEAwwpTG9nYm9vayBvZiB0aGUgV29ybGQgUHJvZHVjdGlvbiBDQSBNb2Nr +dXAxHzAdBgkqhkiG9w0BCQEWEGxvdHdAZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCgUrWJi10wdsOnc97yz4SYaY9QHClzMSErSXl4 +bNdDPg8aQIRjp+/+qL9bNVJ+zoWwqsgd6U+bJLhITAvaONBDMjGbggj08a7fLNMz +u6fVjU1jiMQ1JHYazVPFKaO9wwS6eItd1e/jUPfRp76LyAoeW+lnW14nN5YnIwpl +Aq2A13ZXK2M5eRhtubM5KHIG+hCtdPbQ0NW0f+pjNIgQn3wJUenOHsNlAcNv1s/v +sgtKork1J7E9oBTNBji8/ciDEhACDQ1P4yQDyik2rXWNbx/TIfAvmB8IrP7bE3om +RKFrAmbrxx1ivxpGP8oWFwG6OPnXjLEzo8iFvIX0bQEVMJ5nAgMBAAGgADANBgkq +hkiG9w0BAQsFAAOCAQEAkyvGwl42w3mgx9MvCRr8Q4Wi7iZeiBKoyErb612jJ/5i +R7lksThwfW+SjpLWnQqcNxd/PZ40/YLAyQbTCkdL2v8/jbMcFNO550lu/AgsrEID +MqaSvJvO44Lh8d2OrorCPVSm625uLg9WruaJNqc6SZ1n/8jKgn8vnI13aKsLcDHL +Rtng/Bk1W3VpWlsXwb2fcuViUHXAVrnXsAVLGP3fht2iUie3zEpHjQCPh1epYYXX +JHQdArzu/q3TV0FlmhWiu42nuxaZ6NzjuPEHyGk7Vta4jy7EkmhTjfMF/iz8dD6W +iu/Fi7b0YrFyIyZPBXDm0Fn4bJRLszyaMyAEkLYrZw== +-----END CERTIFICATE REQUEST----- diff --git a/testcases/generator/intermediate/ca.key.pem b/testcases/generator/intermediate/ca.key.pem new file mode 100644 index 0000000..2b86895 --- /dev/null +++ b/testcases/generator/intermediate/ca.key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCgUrWJi10wdsOn +c97yz4SYaY9QHClzMSErSXl4bNdDPg8aQIRjp+/+qL9bNVJ+zoWwqsgd6U+bJLhI +TAvaONBDMjGbggj08a7fLNMzu6fVjU1jiMQ1JHYazVPFKaO9wwS6eItd1e/jUPfR +p76LyAoeW+lnW14nN5YnIwplAq2A13ZXK2M5eRhtubM5KHIG+hCtdPbQ0NW0f+pj +NIgQn3wJUenOHsNlAcNv1s/vsgtKork1J7E9oBTNBji8/ciDEhACDQ1P4yQDyik2 +rXWNbx/TIfAvmB8IrP7bE3omRKFrAmbrxx1ivxpGP8oWFwG6OPnXjLEzo8iFvIX0 +bQEVMJ5nAgMBAAECggEAKyZ3s+BtoYilmmFGZWXTE05+AxrBUT6s5cCtz+rDeVav +q+ond8cQgiMa9cqBPJ4LP4SHvf04rtIQQ20sV3ypGRzeWzOBg6O05F5lLexY/NI+ +PQbngEIjA421+T/+0Sk3EZU2NXhKS41UVfpm/6pEhu1IAciGq9l7MWdt+cfhuOZX +QLMY/5+MWJf8Ru16tQjl34XeM0+3wFt6glcdiCtcCr/sxGYU/vsKaZvrtvqs7PkU +82MtyJfXjAKkC94FekEVOSUJtGuKrTffxy4yH/dtNyeaNiLkRDpXIAbP1xZiAz9N +aG7MjunfvObpLAHCeiwVQdNRkO2XjpY5VyUhLbM3gQKBgQC1qp/Tv/C0FiMTWhZE +bF2Wy4FXHnK+rgnqCLlKCDFi0Cb760HJnlJa/kc+pWFCTRhoE+80iEdE+66aVIE2 +WdzpLuA8GPfibvklu7ASpa0R437UAkKroF8dZXXdEOKBe7u1HFrGhv1dNftM/fVu +D4gKlA+I+cZJ5wJvb2htpKPhJwKBgQDh7GJRa4FH6JX837LYedxHI1Z6VkC6h+qL +id9t7+svf+ftqe4CMWLqzp1+39ci1TF3trwXWdEnbBDWLOTfe9pKoDrH/e+qtF/4 +N6JL5j2afSivY6QbZadsL8sKyn3QjWTX++r/N4DpptGsQ390z/8nsVEw0Hel1RUW +Xn4mK+kgwQKBgQCKj/jWJsluYpAgW48uY0VDFjex/kxg+hgfxMWnHPamOsPxVDBa +mwKP2vD2bGfxjSI3iDTkaamKiTlVB22CyioARbvMuvKfaCtqx2x13J5UTaPYC11U +0L6bil7K3e0V/A1hB56JXD72EI173RyM9RW7k9EBlhnTFns6CcyqDHDe8wKBgQCI +nliqIdeQ835X57KQI8joH994pVYJNo3ICfzZz16qX6+R0dPC8bh+g6lMAvJm9wMu +AIvnlwHa1AeubIGO/6d2v0QskkvvL5plUMdNHJMeLBeBUED57FP9IT2obeD9T7Ou +xIFMCnVjVeSvRjX6HpmOmDSfz0C7QIq69zNTw/P7QQKBgBA+IpYxe6wMEcMnb124 +f3Rl8y5JvsvZMz44r9BrVRW870Aaex8IRpTtKrg0aLftks5to69frgIf/ri6PFXs +uaACayleku6C8eWGEsqpaXNzN36bsu8D/MH5XoVG6LpP1fGLlMpujGyYO+jCQmWA +OVYvQxVNfnIZuxll11Hk1mnz +-----END PRIVATE KEY----- diff --git a/testcases/generator/intermediate/index.txt b/testcases/generator/intermediate/index.txt new file mode 100644 index 0000000..4c156ef --- /dev/null +++ b/testcases/generator/intermediate/index.txt @@ -0,0 +1 @@ +V 370228102225Z 01 unknown /CN=John Doe/Callsign=N0CALL/emailAddress=john@example.com diff --git a/testcases/generator/intermediate/index.txt.attr b/testcases/generator/intermediate/index.txt.attr new file mode 100644 index 0000000..8f7e63a --- /dev/null +++ b/testcases/generator/intermediate/index.txt.attr @@ -0,0 +1 @@ +unique_subject = yes diff --git a/testcases/generator/intermediate/serial b/testcases/generator/intermediate/serial new file mode 100644 index 0000000..9e22bcb --- /dev/null +++ b/testcases/generator/intermediate/serial @@ -0,0 +1 @@ +02 diff --git a/testcases/generator/openssl.conf b/testcases/generator/openssl.conf new file mode 100644 index 0000000..8dc5daf --- /dev/null +++ b/testcases/generator/openssl.conf @@ -0,0 +1,119 @@ + +oid_section = lotw_oids + +[ lotw_oids ] +Callsign=1.3.6.1.4.1.12348.1.1 + +[ ca ] +default_ca = CA_root + +[ CA_root ] +dir = ./root +certs = $dir/certs +crl_dir = $dir/crl +new_certs_dir = $dir +database = $dir/index.txt +serial = $dir/serial +RANDFILE = $dir/private/.rand + +private_key = $dir/ca.key.pem +certificate = $dir/ca.cert.pem + +crlnumber = $dir/crlnumber +crl = $dir/ca.crl.pem +crl_extensions = crl_ext +default_crl_days = 30 + +default_md = sha256 + +name_opt = ca_default +cert_opt = ca_default +default_days = 375 +preserve = no +policy = policy_strict + +[ CA_intermediate ] +dir = ./intermediate +certs = $dir +crl_dir = $dir +new_certs_dir = $dir +database = $dir/index.txt +serial = $dir/serial +RANDFILE = $dir/.rand +private_key = $dir/ca.key.pem +certificate = $dir/ca.cert.pem + +crlnumber = $dir/crlnumber +crl = $dir/ca.crl.pem +crl_extensions = crl_ext +default_crl_days = 30 + +default_md = sha256 + +name_opt = ca_default +cert_opt = ca_default +default_days = 375 +preserve = no +policy = policy_loose + +[ policy_strict ] +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ policy_loose ] +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +Callsign = supplied +emailAddress = optional + +[ req ] +default_bits = 2048 +distinguished_name = req_distinguished_name +string_mask = utf8only +default_md = sha256 +x509_extensions = v3_ca + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +stateOrProvinceName = State or Province Name +localityName = Locality Name +0.organizationName = Organization Name +organizationalUnitName = Organizational Unit Name +commonName = Common Name +emailAddress = Email Address +Callsign = Callsign + +countryName_default = US +stateOrProvinceName_default = CT +localityName_default = NotNewington +0.organizationName_default = Logbook of the World Mockup +organizationalUnitName_default = Fake American Radio Relay League +emailAddress_default = lotw@example.com +Callsign_default = N0CALL + +[ v3_ca ] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ v3_intermediate_ca ] +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ user_cert ] +subjectKeyIdentifier = hash +basicConstraints = CA:FALSE +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment + diff --git a/testcases/generator/root/01.pem b/testcases/generator/root/01.pem new file mode 100644 index 0000000..f0c8412 --- /dev/null +++ b/testcases/generator/root/01.pem @@ -0,0 +1,32 @@ +-----BEGIN CERTIFICATE----- +MIIFbzCCA1egAwIBAgIBATANBgkqhkiG9w0BAQsFADCBzzELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNUMRMwEQYDVQQHDApQc2V1ZG9jaXR5MSkwJwYDVQQKDCBGYWtl +IEFtZXJpY2FuIFJhZGlvIFJlbGF5IExlYWd1ZTEkMCIGA1UECwwbTG9nYm9vayBv +ZiB0aGUgV29ybGQgTW9ja3VwMSwwKgYDVQQDDCNMb2dib29rIG9mIHRoZSBXb3Js +ZCBSb290IENBIE1vY2t1cDEfMB0GCSqGSIb3DQEJARYQbG90d0BleGFtcGxlLmNv +bTAeFw0yMzA2MjIxMDIyMjVaFw0zOTExMjUxMDIyMjVaMIHAMQswCQYDVQQGEwJV +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zs38lGSvy8UnnerW9RhYRrwuSHIVrdLFO/+LGl7w7TNnh +9o3t1oYZZlGRN93rVp+ApbhC+OgpcqkTB16f6L7YHkX+toeKlEZYUzjGF/EMOn6T +iLTamzIrU1+J0dJTRIpHX7EW9o+a4JhafLMcqV9xfZkadqOBS4z80/prGzJ5AtKN +b8CAOy+G+H65+lNjBCtYrqohti9jJ8TlDf7UtDV2rg2rSFuxfbkna07+DeqzyNAq +YsWTTnXxHcYVQcZJpqp+m2OorPnYguEr+mgnP2hTCvqOxdralqtCKF8tWa64PhSf +2GQptkHCAmAsrMlxU7JBI8JRVRbgMNiLvONIxaooz1O7WQyRFPqkLy8fmcnQeQHl +stqQ1JsJfsvwNZzAkL/PfBGdGsITtLRH+UhgEYzexuuZzPMZ0mWD44kE4M5ueyBg +3JON +-----END CERTIFICATE----- diff --git a/testcases/generator/root/ca.cert.pem b/testcases/generator/root/ca.cert.pem new file mode 100644 index 0000000..e73950f --- /dev/null +++ b/testcases/generator/root/ca.cert.pem @@ -0,0 +1,38 @@ +-----BEGIN CERTIFICATE----- +MIIGkTCCBHmgAwIBAgIUAnVOzjA5t2VXdF8jhILoTOaLvygwDQYJKoZIhvcNAQEN +BQAwgc8xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJDVDETMBEGA1UEBwwKUHNldWRv +Y2l0eTEpMCcGA1UECgwgRmFrZSBBbWVyaWNhbiBSYWRpbyBSZWxheSBMZWFndWUx +JDAiBgNVBAsMG0xvZ2Jvb2sgb2YgdGhlIFdvcmxkIE1vY2t1cDEsMCoGA1UEAwwj +TG9nYm9vayBvZiB0aGUgV29ybGQgUm9vdCBDQSBNb2NrdXAxHzAdBgkqhkiG9w0B +CQEWEGxvdHdAZXhhbXBsZS5jb20wHhcNMjMwNjIyMTAyMjI1WhcNNDMwNjE3MTAy +MjI1WjCBzzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNUMRMwEQYDVQQHDApQc2V1 +ZG9jaXR5MSkwJwYDVQQKDCB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EB/wQEAwIB +hjANBgkqhkiG9w0BAQ0FAAOCAgEAm6ZVom1SxLzi/P3qxrXsNR//B3Tx4yVSsrPl +VNzUqxS6QYVVHw8AdZuh06s0k/afBUEDalFhRUPliCdtqAl2P5bnmZQ7hl6uF6LN +5+NAQSl0JMObHV51ahMpfX2p2lbF86uRvuRpYnsL63O9AwrlzSkIa+KESxwp4fb7 +G82iWH7RRsyEMDPLrCP0wWrKeUuNYMyKbGah939n9K/GWIxG8I1XYLv0dJA+5GrP +aQxsbpI4edy8JZNyOvxynsUGkHgLEBySWEwCdH2jUPKvgRK+5+qOyfE8KZgzkSN3 +iqafIJqAtYGxHjQ2Co0nubIEUZ1zCXt14WpcBRk4GhqS0yMgyp63vJkuzJX+vGMm +o/yP9twAVuC9GaG8Oq2cYcb/kffw/TE6r6J4OTCAT8J9IbCFIRkEA8ZfLhxZjZYU +gjZxJTp+uZFlKGEa5MNH2zYn6GKn61F7x+BiVG38yMPR9kmHXdiuQPqWBKncOhMX +mCXXkKxFtFgyI8r3XubP/HYtrdpZ6iRd7ev06qC+YU18thbF1FoUG3BtygCuXSiF +El93aiH77LNr7n+L2SXi5IHc0t2nlGUzEYUBlB8D9Gd5P7y6NypBIOu3qVKnEtbi +nNa/4fwuT8uPF8y7OmOMLlydxHTatIJXtTeO8bfAa4VB3GdJbiOjNlMHUqdsQW95 +3i9Q2Ag= +-----END CERTIFICATE----- diff --git a/testcases/generator/root/ca.key.pem b/testcases/generator/root/ca.key.pem new file mode 100644 index 0000000..d28faa4 --- /dev/null +++ b/testcases/generator/root/ca.key.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQC3Ny/IlGQoRQRv +R+YA+nLzMwJf3+FVYLbOkofwFxmA7/Ch5hhYfIVavy2s7cDLD6G1JuAPY6dWpQrQ +l8jyA5xdj0d99jB5/oCayUy0wTF1qreacuXVBxf79gl/SbaWuNdT6gY6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XCppXVXnhgGKe6u98DV3/v +WczelAzzd9K3X8pFaneoPHrAhKNECnk9u/pRf9GG4n2li8yueZuxasUf5bMNGH2Z +sSWs9pZwMCWwa9AibWQ2P8odQYOTS6JVCkrCnasgv/PGl5HqlovifuRGtGYA6olV +YvniJ4u3AehzD6TNqwCcBE1+5EXZ2olC1F7FcPotAoIBACU94il0wm3ra6+tzVvm +eyRqvY82t1NM76W5NRg0iAhL9ylTmcnN5hzarPJeGicQ9647Ys0Chi6ZFkMTEp61 +s+zGVY/pUH2E9sD/AxI+UQGrsYVOF+dmQvKGctxtvvxuJ4C3W2mpNbFn/5QrHnPT +dDtIzugvKPKRD45mhG6jWE8Vs2E4IBwwy7porzZsQNMkkF1pRgv6IxvEyapdplW2 +TOAKoQRl5igLw9YWVg/rr4k60lIUmyNGFwtdB7OGRe2boqnipyk/8gyTzCurVHjt +G+KhWuXoEmkxtVlkyhPHzpwDxxIJwDTvbVj4qSpPWxjI9POE3/1Gu58ApCwgVd6X +DTECggEAfKmI40HdNiLIXzc63Ejdds1NC5Fg88FhLvAGbTnN5Zfmllah4w1Ixkei +QTHdP0SBHYPnRYTn29VJknOlN3HzLR5EaOP7EHYjHV66kOzZLSU29K/AqG2bmNcT +QUZOSkzWKXColt0LaN3WUwKFoT9APqPBFdZFaCBjis05z6Kveg3mENtNOYklgTQ8 +kTTeZemN0dnpalgo6flPHlbf4yxp5jOGIN0/t3Vu/I71OyRsU61omkilkkqRJHcn +FtHD8OrA2WvtSXeDbibV8F6YD/VoZl5q93aV1N/d2IEvtx1igpLsvceoDn5GvyDy +sZaSqNNXeWr+Wn4NnqHN8lFAkb3aCA== +-----END PRIVATE KEY----- diff --git a/testcases/generator/root/index.txt b/testcases/generator/root/index.txt new file mode 100644 index 0000000..56c7373 --- /dev/null +++ b/testcases/generator/root/index.txt @@ -0,0 +1 @@ +V 391125102225Z 01 unknown /C=US/ST=CT/O=Fake American Radio Relay League/OU=Logbook of the World Mockup/CN=Logbook of the World Production CA Mockup/emailAddress=lotw@example.com diff --git a/testcases/generator/root/index.txt.attr b/testcases/generator/root/index.txt.attr new file mode 100644 index 0000000..8f7e63a --- /dev/null +++ b/testcases/generator/root/index.txt.attr @@ -0,0 +1 @@ +unique_subject = yes diff --git a/testcases/generator/root/serial b/testcases/generator/root/serial new file mode 100644 index 0000000..9e22bcb --- /dev/null +++ b/testcases/generator/root/serial @@ -0,0 +1 @@ +02 diff --git a/testcases/generator/user/user.cert.pem b/testcases/generator/user/user.cert.pem new file mode 100644 index 0000000..6299d6a --- /dev/null +++ b/testcases/generator/user/user.cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID5DCCAsygAwIBAgIBATANBgkqhkiG9w0BAQsFADCBwDELMAkGA1UEBhMCVVMx +CzAJBgNVBAgMAkNUMSkwJwYDVQQKDCBGYWtlIEFtZXJpY2FuIFJhZGlvIFJlbGF5 +IExlYWd1ZTEkMCIGA1UECwwbTG9nYm9vayBvZiB0aGUgV29ybGQgTW9ja3VwMTIw +MAYDVQQDDClMb2dib29rIG9mIHRoZSBXb3JsZCBQcm9kdWN0aW9uIENBIE1vY2t1 +cDEfMB0GCSqGSIb3DQEJARYQbG90d0BleGFtcGxlLmNvbTAeFw0yMzA2MjIxMDIy +MjVaFw0zNzAyMjgxMDIyMjVaMEsxETAPBgNVBAMMCEpvaG4gRG9lMRUwEwYJKwYB +BAHgPAEBDAZOMENBTEwxHzAdBgkqhkiG9w0BCQEWEGpvaG5AZXhhbXBsZS5jb20w +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCSxlSePX690qTCbhJ53XQs +UzcqfJgXceSUxzq4JiVgTvbSqjRGQpuHBEAZrUmbiij+GZEnMIErcIhefZt4MBXx +gNp+CI/820VDV1fUAitkawOc8RKqq2jFn7EBBdUTMFL4jSlshjjr+x1KDA3vKpL4 +Pt2HW+oa0Fx7G0Wt7r4BFIhDvpkRGRsVVdt2XF6LhCSJCOOjf59CuXkAVbvCRmac +mYPA3/p0nrLodurrb3cEyVCi9t1Q7M0EFwSV0eyLkPRVhgzr0B9AAXNBnynxzAG+ +I8LlAv4kmilmryWkyfx35Fwes48oVDerSWoHuOi1RR6bZneyqmrZBdHUXWc6wbw/ +AgMBAAGjXTBbMB0GA1UdDgQWBBQ6hJqgn06AAldyLgdcx7ufjJMs6jAJBgNVHRME +AjAAMB8GA1UdIwQYMBaAFHYffR9m6SgxxTvJuyIZ/YJQVtsFMA4GA1UdDwEB/wQE +AwIF4DANBgkqhkiG9w0BAQsFAAOCAQEAkuTC3H28HbvCgL/2OksrOEg8xQnQ+bDo +fRoMlcDhZNOEpCMRYxfuEwXVpkNRJufiJA+XPJg9jKtk+bTDYzp2DBZgeBsJ5C0k +J03hn4z/rCcVMUNoArVE5C+fkZwCBx9hzaJPyYEvwnGbtpyTWPcmfnyeXtzCDj0T +qAGLDtDQw7ERZpj25jsnCPEJN1NmvRxmw4+Tx/1IIxn8s6iWdyUGChHNXK5KJnaU +HUJOVy6k42gjpCKXRDGrwntMyMWUjhWDwjBoUEYeVMspq5I00hptCzMRoVo2CSQC +0PeU3f3qb4L00JzmzHEwa6uNyK0FOjPgxKXIOJUnAQsEWPcmR/i4+A== +-----END CERTIFICATE----- diff --git a/testcases/generator/user/user.csr.pem b/testcases/generator/user/user.csr.pem new file mode 100644 index 0000000..d66f3de --- /dev/null +++ b/testcases/generator/user/user.csr.pem @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIICkDCCAXgCAQAwSzERMA8GA1UEAwwISm9obiBEb2UxHzAdBgkqhkiG9w0BCQEW +EGpvaG5AZXhhbXBsZS5jb20xFTATBgkrBgEEAeA8AQEMBk4wQ0FMTDCCASIwDQYJ +KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJLGVJ49fr3SpMJuEnnddCxTNyp8mBdx +5JTHOrgmJWBO9tKqNEZCm4cEQBmtSZuKKP4ZkScwgStwiF59m3gwFfGA2n4Ij/zb +RUNXV9QCK2RrA5zxEqqraMWfsQEF1RMwUviNKWyGOOv7HUoMDe8qkvg+3Ydb6hrQ +XHsbRa3uvgEUiEO+mREZGxVV23ZcXouEJIkI46N/n0K5eQBVu8JGZpyZg8Df+nSe +suh26utvdwTJUKL23VDszQQXBJXR7IuQ9FWGDOvQH0ABc0GfKfHMAb4jwuUC/iSa +KWavJaTJ/HfkXB6zjyhUN6tJage46LVFHptmd7KqatkF0dRdZzrBvD8CAwEAAaAA +MA0GCSqGSIb3DQEBCwUAA4IBAQBbAnapV2CoymHSx5UVm8EJNJ5jb2BdqCoIylTH +y3dB4rzGuEvH0c7uOZzMxo/z+pQdmyojqOnI21Uc70yTObGrVjoGwz2s6QmsdI3/ +ksom4Mi6TSbBxLg2uj+bsdDhq1pvOAyUrHK6boFeWlhguH5sdSdHTdEr1Q6QL0Nz +LUhiB04PeN+g0jNyehhfVkz9Tgz58A8bbRx6gREUSDJKexKi3nyVhhwNtlDo6aw6 +BgdYoMtb05bkgECvUJZdLczOk9vnKF4Zjv6jIrJF0Us2JB78TH1M8OFXQ+R3da6p +bAt0f2RIZn/xizGvKyhsRXIDV7zFubRea/xPr8T/8B4AdjTa +-----END CERTIFICATE REQUEST----- diff --git a/testcases/generator/user/user.key.pem b/testcases/generator/user/user.key.pem new file mode 100644 index 0000000..7585d4a --- /dev/null +++ b/testcases/generator/user/user.key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCSxlSePX690qTC +bhJ53XQsUzcqfJgXceSUxzq4JiVgTvbSqjRGQpuHBEAZrUmbiij+GZEnMIErcIhe +fZt4MBXxgNp+CI/820VDV1fUAitkawOc8RKqq2jFn7EBBdUTMFL4jSlshjjr+x1K +DA3vKpL4Pt2HW+oa0Fx7G0Wt7r4BFIhDvpkRGRsVVdt2XF6LhCSJCOOjf59CuXkA +VbvCRmacmYPA3/p0nrLodurrb3cEyVCi9t1Q7M0EFwSV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9cqgSHf6qHezssR/PmPYWt/+WsIcqzM+M6BkNd+SyNvFkMbGpAVjRv +fq8Rus1MSPcYDc01tGkOgZY7HTHosAEL3CpLa61lAoGANBly/IdaziEEGJQ1KyoS +srDyrza5Oe+WmLwA7KXqtoOExvS+WGB/HBPRhhdjcDZy4HGgKM0bYgD+3OQwlqtY +ISDNkPJG35htue9qkNoce3cBJnyI4gRB48qnPHTa+5VUrlZrfKfkWSL0rFHCnhTX +jFFhRHTxPN0i192B6JEnlZU= +-----END PRIVATE KEY----- diff --git a/testcases/keys/N0CALL.p12 b/testcases/keys/N0CALL.p12 new file mode 100644 index 0000000..3a440a1 Binary files /dev/null and b/testcases/keys/N0CALL.p12 differ diff --git a/testcases/keys/cache/chain/mockup.der b/testcases/keys/cache/chain/mockup.der new file mode 100644 index 0000000..a3105e6 Binary files /dev/null and b/testcases/keys/cache/chain/mockup.der differ diff --git a/testcases/keys/cache/roots/mockup.der b/testcases/keys/cache/roots/mockup.der new file mode 100644 index 0000000..dd642ad Binary files /dev/null and b/testcases/keys/cache/roots/mockup.der differ diff --git a/testcases/results/.gitkeep b/testcases/results/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/version.txt b/version.txt index 5c4511c..7d6b3eb 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.7 \ No newline at end of file +0.0.8 \ No newline at end of file