From 550f7878bf509cc825726e6d95506e62857d48c9 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Mon, 26 Oct 2020 23:48:36 +0100 Subject: tested certificate chain code path further Added more documentation and quick helper scripts for now. We need to specify which signature schemes we expect/support from submitters. --- server/main.go | 2 +- server/testdata/anchors.pem | 32 -------------- server/testdata/chain/README.md | 44 +++++++++++++++++++ server/testdata/chain/rgdd-ecdsa.csr | 8 ++++ server/testdata/chain/rgdd-ecdsa.key | 5 +++ server/testdata/chain/rgdd-ecdsa.pem | 10 +++++ server/testdata/chain/rgdd-root.key | 3 ++ server/testdata/chain/rgdd-root.pem | 11 +++++ server/testdata/chain/rgdd-root.srl | 1 + server/testdata/chain/rgdd-rsa.csr | 27 ++++++++++++ server/testdata/chain/rgdd-rsa.key | 51 ++++++++++++++++++++++ server/testdata/chain/rgdd-rsa.pem | 20 +++++++++ server/testdata/cmd/add-entry | 34 +++++++++++++++ server/testdata/end-entity.key | 51 ---------------------- server/testdata/end-entity.pem | 30 ------------- server/testdata/entry/README.md | 21 +++++++++ server/testdata/entry/main.go | 46 +++++++++++++++++++ server/testdata/entry/stitem/foobar-0.0.1 | Bin 0 -> 48 bytes server/testdata/entry/stitem/foobar-0.0.1.b64 | 1 + server/testdata/entry/stitem/foobar-0.0.1.sig | 3 ++ server/testdata/entry/stitem/foobar-0.0.1.sig.b64 | 1 + server/testdata/root.key | 51 ---------------------- server/testdata/root.pem | 32 -------------- 23 files changed, 287 insertions(+), 197 deletions(-) delete mode 100644 server/testdata/anchors.pem create mode 100644 server/testdata/chain/README.md create mode 100644 server/testdata/chain/rgdd-ecdsa.csr create mode 100644 server/testdata/chain/rgdd-ecdsa.key create mode 100644 server/testdata/chain/rgdd-ecdsa.pem create mode 100644 server/testdata/chain/rgdd-root.key create mode 100644 server/testdata/chain/rgdd-root.pem create mode 100644 server/testdata/chain/rgdd-root.srl create mode 100644 server/testdata/chain/rgdd-rsa.csr create mode 100644 server/testdata/chain/rgdd-rsa.key create mode 100644 server/testdata/chain/rgdd-rsa.pem create mode 100755 server/testdata/cmd/add-entry delete mode 100644 server/testdata/end-entity.key delete mode 100644 server/testdata/end-entity.pem create mode 100644 server/testdata/entry/README.md create mode 100644 server/testdata/entry/main.go create mode 100644 server/testdata/entry/stitem/foobar-0.0.1 create mode 100644 server/testdata/entry/stitem/foobar-0.0.1.b64 create mode 100644 server/testdata/entry/stitem/foobar-0.0.1.sig create mode 100644 server/testdata/entry/stitem/foobar-0.0.1.sig.b64 delete mode 100644 server/testdata/root.key delete mode 100644 server/testdata/root.pem (limited to 'server') diff --git a/server/main.go b/server/main.go index 53df7ee..618d40b 100644 --- a/server/main.go +++ b/server/main.go @@ -23,7 +23,7 @@ var ( prefix = flag.String("prefix", "/st/v1", "a prefix that proceeds each endpoint path") trillianID = flag.Int64("trillian_id", 5991359069696313945, "log identifier in the Trillian database") rpcDeadline = flag.Duration("rpc_deadline", time.Second*10, "deadline for backend RPC requests") - anchorsPemFile = flag.String("anchors_file", "testdata/anchors.pem", "path to a file containing PEM-encoded X.509 root certificates") + anchorsPemFile = flag.String("anchors_file", "testdata/chain/rgdd-root.pem", "path to a file containing PEM-encoded X.509 root certificates") ) func main() { diff --git a/server/testdata/anchors.pem b/server/testdata/anchors.pem deleted file mode 100644 index 6a96054..0000000 --- a/server/testdata/anchors.pem +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFiTCCA3GgAwIBAgIUCpdSpYgFV7bmPzdIAcesg5ZJxe4wDQYJKoZIhvcNAQEL -BQAwVDELMAkGA1UEBhMCU0UxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM -GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDENMAsGA1UEAwwEcmdkZDAeFw0yMDEw -MjMxNDI4MzFaFw0yMzA4MTMxNDI4MzFaMFQxCzAJBgNVBAYTAlNFMRMwEQYDVQQI -DApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaW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aRbQQ4y2Lx4/i8J4hj8//IYR0lEnDNEpOkMM1pZYU5bsB7aUfJOaHVD -QnUyAiudZtSTWNT0rB2vYYef8yBFQoSi2Uj5CCdoM4ubi/pEvnbtT8rKseaycjBA -2lw+fO4B6s3haRWY+U8BAEqTUq9GesH++SM9t1VDAlcoRZx2s6JeZrvSYMs6NyVQ -JilrhOmRg6Dghkt9UJQWpCkslxsEze1Crz1KQgFyRwtqkaeDGlwRGhySlHCMg4vu -aXGDdSTUv2m9Ss31ktwEmMNcPI7vyehHyhFnt6wi3FzCnQu/I5D4MtOerrUljLiU -qXQkFGditrKuZQnRwx6mOAy5hIrtJVqlBi+bzmNAoUHdkcID8YEpbx47eBEIwyct -Wi2x19FOI+aECutO/OjzkfOkig3cZg0qwAm/JJsve4nc8d5D2HewH99EFGtuz1jn -4mimMAjebW17Uf484w4wI3IeQ/F+nDvk14xkD+Hc90tq6KH7z0DplhXVIvx8SPs3 -9109jghVzFwjxF+FS9QkvUQaqdoyVCw5SI0c3hA= ------END CERTIFICATE----- diff --git a/server/testdata/chain/README.md b/server/testdata/chain/README.md new file mode 100644 index 0000000..fc19735 --- /dev/null +++ b/server/testdata/chain/README.md @@ -0,0 +1,44 @@ +# Create new certificate chains +A more in-depth explanation of the different commands and parameters can be +found in the man pages, e.g., `man openssl-genpkey` and `man openssl-req` + +## Root certificate +``` +# Generate ed25519 private key +$ openssl genpkey -algorithm ed25519 -out rgdd-root.key + +### +# Create and self-sign a root certificate +# -x509 => output a self-signed certificate +# -new => prompt the user for relevant field values +# -key => file to read private key from +# -days => number of days that the certificate is valid +# -out => where to write the resulting PEM-encoded certificate +### +$ openssl req -x509 -new -key rgdd-root.key -days 2048 -out rgdd-root.pem + +# View the generated certificate +$ openssl x509 -in rgdd-root.pem -text -noout +``` + +## End-entity certificates +Let's generate two different end-entity certificates. One that uses ECDSA, and +another one that uses RSA. Note that `-CAcreateserial` creates a file with the +next serial number if it does not exist. After a certificate is issued, this +number is incremented. + +### NIST P-256 +``` +$ openssl ecparam -genkey -name prime256v1 -noout -out rgdd-ecdsa.key +$ openssl req -new -key rgdd-ecdsa.key -out rgdd-ecdsa.csr +$ openssl x509 -req -in rgdd-ecdsa.csr -CA rgdd-root.pem -CAkey rgdd-root.key -CAcreateserial -out rgdd-ecdsa.pem -days 1024 +$ openssl x509 -in rgdd-ecdsa.pem -text -noout +``` + +### RSA +``` +$ openssl genrsa -out rgdd-rsa.key 4096 +$ openssl req -new -key rgdd-rsa.key -out rgdd-rsa.csr +$ openssl x509 -req -in rgdd-rsa.csr -CA rgdd-root.pem -CAkey rgdd-root.key -CAcreateserial -out rgdd-rsa.pem -days 1024 +$ openssl x509 -in rgdd-rsa.pem -text -noout +``` diff --git a/server/testdata/chain/rgdd-ecdsa.csr b/server/testdata/chain/rgdd-ecdsa.csr new file mode 100644 index 0000000..4594ac7 --- /dev/null +++ b/server/testdata/chain/rgdd-ecdsa.csr @@ -0,0 +1,8 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIH/MIGnAgEAMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw +HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwWTATBgcqhkjOPQIBBggq +hkjOPQMBBwNCAAS0HCnBOAIerw9sIB1juMsgIbOkQ6AoyFeAwHNjkmnM/TmP01/w +u0MimgeZGepyaTGOi01SVLcCcId5mzATgrZEoAAwCgYIKoZIzj0EAwIDRwAwRAIg +QZ4OT72aVFTc3W4XQZdVIvtSXStRYp5NA6Ei69lv6BACIHnKSIXhNSmGeHI2Lwuq +s2uAm0sEP3/j6d1Pzm3ymPp4 +-----END CERTIFICATE REQUEST----- diff --git a/server/testdata/chain/rgdd-ecdsa.key b/server/testdata/chain/rgdd-ecdsa.key new file mode 100644 index 0000000..6ac18ca --- /dev/null +++ b/server/testdata/chain/rgdd-ecdsa.key @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIPqFWTEd8sZG9Fc/CwfUQCTR/GFZYzbFrkxEufY6f2qVoAoGCCqGSM49 +AwEHoUQDQgAEtBwpwTgCHq8PbCAdY7jLICGzpEOgKMhXgMBzY5JpzP05j9Nf8LtD +IpoHmRnqcmkxjotNUlS3AnCHeZswE4K2RA== +-----END EC PRIVATE KEY----- diff --git a/server/testdata/chain/rgdd-ecdsa.pem b/server/testdata/chain/rgdd-ecdsa.pem new file mode 100644 index 0000000..f93f0a2 --- /dev/null +++ b/server/testdata/chain/rgdd-ecdsa.pem @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE----- +MIIBdDCCASYCFA1YWDyW1iZyA9IVo6X0edUqQDP2MAUGAytlcDBFMQswCQYDVQQG +EwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lk +Z2l0cyBQdHkgTHRkMB4XDTIwMTAyNjIyMzYyMFoXDTIzMDgxNjIyMzYyMFowRTEL +MAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVy +bmV0IFdpZGdpdHMgUHR5IEx0ZDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLQc +KcE4Ah6vD2wgHWO4yyAhs6RDoCjIV4DAc2OSacz9OY/TX/C7QyKaB5kZ6nJpMY6L +TVJUtwJwh3mbMBOCtkQwBQYDK2VwA0EA3p8koB34InjhzheTH+Mv6d4ScqDZ9GT2 +w6eNKFhd5kcr0vrcJ7J7Jzm6lY1fR3mZzvv4ko0OdW2a6iY7ikTdAA== +-----END CERTIFICATE----- diff --git a/server/testdata/chain/rgdd-root.key b/server/testdata/chain/rgdd-root.key new file mode 100644 index 0000000..74e2928 --- /dev/null +++ b/server/testdata/chain/rgdd-root.key @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIHD6JY7yaitYT5aDrIWdZ6MBtRdqpggWyfhqJH3znLR2 +-----END PRIVATE KEY----- diff --git a/server/testdata/chain/rgdd-root.pem b/server/testdata/chain/rgdd-root.pem new file mode 100644 index 0000000..75f7a8e --- /dev/null +++ b/server/testdata/chain/rgdd-root.pem @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBnzCCAVGgAwIBAgIUCjfMeafmxgsMeaQQQuP8vMkjRgwwBQYDK2VwMEUxCzAJ +BgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5l +dCBXaWRnaXRzIFB0eSBMdGQwHhcNMjAxMDI2MjIzNTUwWhcNMjYwNjA1MjIzNTUw +WjBFMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwY +SW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMCowBQYDK2VwAyEAbu58egSJq3r5n8pJ +JVkNGoZsp28dRFC8LDMThg9IWNmjUzBRMB0GA1UdDgQWBBT1tfMTNJANubW44TUZ +0q24o27lRTAfBgNVHSMEGDAWgBT1tfMTNJANubW44TUZ0q24o27lRTAPBgNVHRMB +Af8EBTADAQH/MAUGAytlcANBAOfrYoK45bNHSCxtD70LGAWO3AYJnH4M0hkaIOsf +rb7/ses1xvDTi0AuOcKpnNtRmfDTGT81iHC+U2dqL/h5Gw8= +-----END CERTIFICATE----- diff --git a/server/testdata/chain/rgdd-root.srl b/server/testdata/chain/rgdd-root.srl new file mode 100644 index 0000000..dac138f --- /dev/null +++ b/server/testdata/chain/rgdd-root.srl @@ -0,0 +1 @@ +0D58583C96D6267203D215A3A5F479D52A4033F9 diff --git a/server/testdata/chain/rgdd-rsa.csr b/server/testdata/chain/rgdd-rsa.csr new file mode 100644 index 0000000..0708212 --- /dev/null +++ b/server/testdata/chain/rgdd-rsa.csr @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEijCCAnICAQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx +ITAf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iOrHYsN3VNjMhvMisCUUvwSI9vV3gA +MRzfHJKMd2YMOFbj62oZ9ZgmiZBSOX035m0GOt2qtm2cBCUvmLb1p0mKxx9sqXql +Xj4rTT/acS0m6s3r680zxmdd6ADz3485n5bqpK24oGfTBYAk6v+oQApd1iorIp1P +uRobIHQaUOCMmXfAQuhvC7iws2c8dwd4AVjNZI57xKuBjtdIXnGg3+y5btmp1mg6 +lDzaoG4bMEReCr7UzDCCRzDoKdtx62XxaTj5jHHZ4fgyKsuoNCz2+d570YWseZBf +rYRlXE/sPX4N1KLG7QOa9rYcJxJNov8BI+ONjZ7+OWdNBN1KIWolmgYWm1HOuiyJ +nON3KbKS/Rmsr8LUitCido2BDx0jZA0HrBOM3rLs1lj9X0RXeBF12gXFR0tTyP/o +RLY5kHclMD4h9jybBwM= +-----END CERTIFICATE REQUEST----- diff --git a/server/testdata/chain/rgdd-rsa.key b/server/testdata/chain/rgdd-rsa.key new file mode 100644 index 0000000..f4a8259 --- /dev/null +++ b/server/testdata/chain/rgdd-rsa.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJJwIBAAKCAgEAxXRP9CE4wLdhYLTaJT8rp/Z8EBOBIs4jID41uK1jW+fMzVS6 +DTQIcOvlnwJL+23bn6cIk+Sp8xSqMiaTF1oiWS10VrVolkh5PXEuMDLtWzgvxvuI +NDahiZ9tiUsqRYWSkQfmKeiF9PybvEcyZQ8DyvnNbYnoX5HGXn/9T8N3QrwloAQ6 +P+2T0kb6ykywA/8epQ7XBV+ifqw3D+9M9ueUfBVCfb5WBGjfJaRSjjDfgtQlsJV7 +Sm+Ll6nY5665LewqZNqS+Pxa/R88YJtttWMy0UodubWSf24JjcvfenJFMxDMQpoh +dNTvjcmYN/kt9FO7uaieW74kUhTagVwqrdX3Ot50KZnPLgkQ2uMPV1nJfXKqp4Ow +tTTrNhcij91LbBKLiVxJZelhicDBR/8Gtht4XmYVMnNJJxk/zn84otcAYVt7QgGm +rFlwJY5kL49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teYMqA1i9sElbFlS77HOBNxomWTi5sPly35GW7VCjNq0FVQyJsFUQ2aFa6lKNONs +rFU/WXnaiyANO9T+Qq1Lt+oKyvMFmbyouUO0i+Q0Qep2ddIa+j6iJvLyMsdLCR79 +jtBmaox4umUmYSxAunkiHTKoXVk/wEI/MRofSaKEcy9c9lfhmxhXYZY1CrL3Gpge +fnGzh22ZFkFOMY7WSGEcizY0xiGNV3ECggEAYg8/MEFShIjBEiPDFJi4XOXUj9Ew +m05ZL7SWJdAytt7B1KF4C6I86CjuHqFvwHjJjSWjBbfebheaq8eDH/6ByG5RIEeF +ySuP44zNsHYjX4Nv2CogHURZzBCc96FlqF0lEpHPsWKDt41ULdpZNO5qCkVInObz +jdryFUpNcF8DX9SwQvcE/aNnPdZfK7Ga8AFgHfw9F+5FzAj0/IWWxI4rlrrp3deY +S2L2jxIOhEVrRNLAZn7VZ9WaHS3+OPUEy1as5poecehFXTnGXBS2+//Nh8OmyEGm +rNHmON5XW51UXSy+7bGFZolhPjicIKCRLBYcwBNf32/Ng9vI5++6XkSAuQ== +-----END RSA PRIVATE KEY----- diff --git a/server/testdata/chain/rgdd-rsa.pem b/server/testdata/chain/rgdd-rsa.pem new file mode 100644 index 0000000..eefb697 --- /dev/null +++ b/server/testdata/chain/rgdd-rsa.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDPzCCAvECFA1YWDyW1iZyA9IVo6X0edUqQDP5MAUGAytlcDBFMQswCQYDVQQG +EwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lk +Z2l0cyBQdHkgTHRkMB4XDTIwMTAyNjIyMzc0N1oXDTIzMDgxNjIyMzc0N1owRTEL +MAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVy +bmV0IFdpZGdpdHMgUHR5IEx0ZDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC +ggIBAMV0T/QhOMC3YWC02iU/K6f2fBATgSLOIyA+NbitY1vnzM1Uug00CHDr5Z8C +S/tt25+nCJPkqfMUqjImkxdaIlktdFa1aJZIeT1xLjAy7Vs4L8b7iDQ2oYmfbYlL +KkWFkpEH5inohfT8m7xHMmUPA8r5zW2J6F+Rxl5//U/Dd0K8JaAEOj/tk9JG+spM +sAP/HqUO1wVfon6sNw/vTPbnlHwVQn2+VgRo3yWkUo4w34LUJbCVe0pvi5ep2Oeu +uS3sKmTakvj8Wv0fPGCbbbVjMtFKHbm1kn9uCY3L33pyRTMQzEKaIXTU743JmDf5 +LfRTu7monlu+JFIU2oFcKq3V9zredCmZzy4JENrjD1dZyX1yqqeDsLU06zYXIo/d +S2wSi4lcSWXpYYnAwUf/BrYbeF5mFTJzSScZP85/OKLXAGFbe0IBpqxZcCWOZC+P +YOedoH+oyKWANFlmO4A64vwkYEvLIT1mC5obM7f8l8vzw3e5yeYPWPpZlTCtGeMQ +v0Vkrbgqu+sz5qe5JTvrJd04z06kVR948Tm0HvNBARZSHe81XY9K43qiZ4wSoTCc +RnjBL9Zbrbmj/Amp3M2wnLB1QRBsp9H4eKHncC2huzojOCueFPgEGDJu4GMtbDVz +4eoWnOF6Xr4lQx0cBE5aXJ/YRLvln6NGjwygXFCCel+uXDEjAgMBAAEwBQYDK2Vw +A0EAQeks+dakJG9woMoFtsdb/W6SZ6b8gFXjxiYhLw7LkChPvohPEjp7XSfv/OPx +VVXG3riQWYiwigTXad8ENIx8Cg== +-----END CERTIFICATE----- diff --git a/server/testdata/cmd/add-entry b/server/testdata/cmd/add-entry new file mode 100755 index 0000000..d7346bb --- /dev/null +++ b/server/testdata/cmd/add-entry @@ -0,0 +1,34 @@ +#!/bin/bash + +set -eo pipefail + +algo=ecdsa +key_path="../chain/rgdd-$algo.key" +cert_path="../chain/rgdd-$algo.pem" +name="foobar-0.0.1" + +if [[ ! -z $1 ]]; then + name=$1 +fi +echo "[Info] package name: $name" >&2 + + +echo "[Info] generating StItem and signature..." >&2 +pushd ../entry >/dev/null + go run . --dir stitem --name $name + openssl dgst -sha256 -sign $key_path -out stitem/$name.sig stitem/$name + openssl base64 -A -in stitem/$name -out stitem/$name.b64 + openssl base64 -A -in stitem/$name.sig -out stitem/$name.sig.b64 + json=$(printf '{"item":"%s","signature":"%s","certificate":"%s"}'\ + $(cat stitem/$name.b64)\ + $(cat stitem/$name.sig.b64)\ + $(cat $cert_path |\ + sed '1,1d;$ d' |\ + xargs |\ + sed 's/ //g')) + rm -f stitem/$name{,.sig,.b64,.sig.b64} +popd >/dev/null + +echo "[Info] doing add-entry request" +curl --header "application/json" --request POST --data $json\ + localhost:6965/st/v1/add-entry diff --git a/server/testdata/end-entity.key b/server/testdata/end-entity.key deleted file mode 100644 index f232f2e..0000000 --- a/server/testdata/end-entity.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEAx42J+xiAYTGGJL0w6KHXV6in9IuHOBiyKvavVog8qWh1dh3I -3nIUA3i0CdbeuLRubovCpOIFk2HjKo1qxpdh/Iab3RtTBEYghz8bkdIi3PhNdsgK -Uh2Pi7GCE/+0NdzMKUxLLSqJAIF+WymbfnnRYsxPjPBusnNdTunLWuvjS2AcpaLF -cF+LojdlaFBUDvDYGWpPh60/z9IjUE7JbxluAl4GZYIx2bSlhQZ96bse/HoEjeJu -mv74JZ4GI1SH/TjFJCQSKRMPimm7PXsTDoaZrw/8Bc+FfVbLyp7u3ML28WGfABzP -jvzXScKPTRjjoVdX2BWpkOV7T5zVYsJAs6cGbIgJ6UWPsOafSrIPTSCz17sNDCaN -1PtkNKemosMFt8aZvnYXeypvMC0SPFKQr3+uFuxRIjRIrRrVfLfIb9iHBo20vSbu -nnRt9jwmHq5UvXxLSMoBdFKMp8RmnV22e40gpWppZ3C4e8HaDrGsGV0LB04PFkFa -a/iqyAh8NxG7c4AFzkD7efDg+XQ1ujSLtnX0Mr+C/HGVpoJVRdMxnRGnUIdGt6tX -rCMGG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NDUVyUDRiL6g+InDyzJn/21xkVq05/uRfecESQQIhyB18kgGgjtQmFX6iqMlvwe -rC/gQoaInw3dxfVDhhSLnDgcdenj40gBAoIBAQCjQj6ptbV0zHDFaKrL27nYBL6b -hvu0TNqNjNBe13xb4KV0TKw8oL5WUV9ylkkmaM5URCNUwZG16CBt+3iTOTwEeQH0 -+3vkvpJqlzDMNUQ3UfpDZKnXNYAv3izbdnBnHFgXRyy32QyfUrMVuN4qoiz42983 -rNoHxvZ4Z0SYxv7ynMcaL/D4DQe+X4FpBtA6WU6/zVmoItQV9nHHNvaHI9aLEKqM -xfyX2QyHckUXgR5SEPqF+iLNz7xidHysYtiybmNUBDPQdsceW87JOMyDT9Wt71tv -PzO7krF64nMcLdxggmB6vFE7s9bj/FZiU80Pgh4rzuDrJLz4YASoKxd8flSy ------END RSA PRIVATE KEY----- diff --git a/server/testdata/end-entity.pem b/server/testdata/end-entity.pem deleted file mode 100644 index ab5154f..0000000 --- a/server/testdata/end-entity.pem +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFMjCCAxoCFFdE6AyXlAd3tmoTZXRkLElTp6d1MA0GCSqGSIb3DQEBCwUAMFQx -CzAJBgNVBAYTAlNFMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl -cm5ldCBXaWRnaXRzIFB0eSBMdGQxDTALBgNVBAMMBHJnZGQwHhcNMjAxMDIzMTQz -NTQ2WhcNMjIwMzE5MTQzNTQ2WjBXMQswCQYDVQQGEwJTRTETMBEGA1UECAwKU29t -ZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRAwDgYD -VQQDDAdyZ2RkLWVlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAx42J -+xiAYTGGJL0w6KHXV6in9IuHOBiyKvavVog8qWh1dh3I3nIUA3i0CdbeuLRubovC -pOIFk2HjKo1qxpdh/Iab3RtTBE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gIhAoFENd+C -5c/K92ntTXgYTGigPbW+a4IUVj0Ry8ctg45JZ40YBGSrReDcap9lct8X/pREY1Af -jBpd5QPBszBaozcuTAVmakiD+YL3/JOCKNbdAYQeSXYi1A0v8n+pNvgEJRQIbbyX -0mQugmo6EEwzRGXcc8NnBgA3knkpT/PyDgzS1uTGoDYh1iPSkkVtXNxrNgmA7jem -Kls6XILMjQzGWAo2R/8aVnlTCF0rDBV3I12wcSQ/MsjMVXwag1k= ------END CERTIFICATE----- diff --git a/server/testdata/entry/README.md b/server/testdata/entry/README.md new file mode 100644 index 0000000..0d26ca3 --- /dev/null +++ b/server/testdata/entry/README.md @@ -0,0 +1,21 @@ +# Create `item` and `signature` for the add-entry endpoint + +## Create a serialized `checksum_v1` entry +The following creates a serialized `checksum_v1` StItem, such that the package +name is `foobar-0.0.1` and the checksum `SHA256(foobar-0.0.1)`. The result is +stored in the `stitem` directory as `foobar-0.0.1`. +``` +$ go run . --logtostderr --name foobar-0.0.1 --dir stitem +``` + +## Sign the generated file using an end-entity certificate +Let's use our ECDSA end-entity certificate using SHA256 as the hash function. +``` +$ openssl dgst -sha256 -sign "../chain/rgdd-ecdsa.key" -out stitem/foobar-0.0.1.sig stitem/foobar-0.0.1 +``` + +## Encode the resulting StItem and its signature as base-64 +``` +$ openssl base64 -A -in stitem/foobar-0.0.1 -out stitem/foobar-0.0.1.b64 +$ openssl base64 -A -in stitem/foobar-0.0.1.sig -out stitem/foobar-0.0.1.sig.b64 +``` diff --git a/server/testdata/entry/main.go b/server/testdata/entry/main.go new file mode 100644 index 0000000..a849c50 --- /dev/null +++ b/server/testdata/entry/main.go @@ -0,0 +1,46 @@ +package main + +import ( + "flag" + "os" + + "crypto/sha256" + "io/ioutil" + + "github.com/golang/glog" + "github.com/google/certificate-transparency-go/tls" + "github.com/system-transparency/stfe" +) + +var ( + name = flag.String("name", "foobar-1.2.3", "a package identifier") + dir = flag.String("dir", "stitem", "directory path where output is stored") +) + +func main() { + flag.Parse() + + // Use H(name) as a dummy checksum + hasher := sha256.New() + hasher.Write([]byte(*name)) + checksum := hasher.Sum(nil) + + // Create and serialize an StItem of type checksum_v1 + item := stfe.NewChecksumV1([]byte(*name), checksum) + serialized, err := tls.Marshal(item) + if err != nil { + glog.Fatalf("tls marshal failed: %v", err) + } + + // Store the serialized item in *dir/name + if err := os.MkdirAll(*dir, 0755); err != nil { + glog.Fatalf("creating directory %s failed: %v", *dir, err) + } + path := *dir + "/" + *name + if err := ioutil.WriteFile(path, serialized, 0644); err != nil { + glog.Fatalf("writing to %s failed: %v", path, err) + } + + glog.Infof("Created serialized checksum_v1 StItem: %s", path) + glog.Flush() +} diff --git a/server/testdata/entry/stitem/foobar-0.0.1 b/server/testdata/entry/stitem/foobar-0.0.1 new file mode 100644 index 0000000..c667a36 Binary files /dev/null and b/server/testdata/entry/stitem/foobar-0.0.1 differ diff --git a/server/testdata/entry/stitem/foobar-0.0.1.b64 b/server/testdata/entry/stitem/foobar-0.0.1.b64 new file mode 100644 index 0000000..be3c14e --- /dev/null +++ b/server/testdata/entry/stitem/foobar-0.0.1.b64 @@ -0,0 +1 @@ +AAUMZm9vYmFyLTAuMC4xIHGVn/IR9o8GWqaDg88B65mgmWaY4+5EvQD12+c6/zgQ \ No newline at end of file diff --git a/server/testdata/entry/stitem/foobar-0.0.1.sig b/server/testdata/entry/stitem/foobar-0.0.1.sig new file mode 100644 index 0000000..12062a4 --- /dev/null +++ b/server/testdata/entry/stitem/foobar-0.0.1.sig @@ -0,0 +1,3 @@ +Kqx0||:YnYwڳQL1MV f7 h,##Pq)fZ<6JǗ;59h.'FLBW<:qJg^(>X i<Í=D]U. n7#T?UuΖW:BY'牛 *j:Bj]ȍE:.>Fg᭻ǰ 9=>`*|R Ǔ"{*ΠqÛF>27fSGzms`D=ч]S%$.lc_GHXbsB!=mLg?eJt6c[ΧD7nEdlRzV֔^9al%8H e +x&L +}-~,?Mz}Ni^˫,0)pz"w p'"!Z.xCc` ]Eb \ No newline at end of file diff --git a/server/testdata/entry/stitem/foobar-0.0.1.sig.b64 b/server/testdata/entry/stitem/foobar-0.0.1.sig.b64 new file mode 100644 index 0000000..d31c0d3 --- /dev/null +++ b/server/testdata/entry/stitem/foobar-0.0.1.sig.b64 @@ -0,0 +1 @@ +A0uScXiGF4yusRyaMHx8+OSfOoua8Fnlblnf63fas/HTUUwxkE1W/Q0E1PjtymY3CcCXGK+WaJMslPeCIyPaUHEBnSnWZpHBGFrMCDzrNpCMmOjGGUrIx5c7CDU5l4xoxS4S/7Qa5CdGTPUQFYlCV80dPDpxSme3Xg6o3yipxT6OjhTw21gJaTzdA8ONPejvRBVdlgNVLgt/bqSCo+039SP/zFQOuD/uVXXOlp1XOkLaz1nPJ+eJmwwqagY6Qmpd/siNhkXROpXtLsU+RqSPZ+Gtu9AIB8ewCTk9wD66YCqmfLNSDceTiwIie7gUm60qmdXOoPCrFHGR0QQPD4D2l5eaHK/Dm0Y+F5UC4IkyN8cfqmYaU0eyem25wZnRc2DGy0Q9t9GHXapTJbQkLgVsY19HSJCOFpIfoVi6BmIWB8P8c0KgjrUWIT1tTL7V52cD6D9lpfZKl4J0NpmximO0w1vhkNj4kv7Op79E8jfjpv36mhdusbJFoGS7wGwIUnqk9oJWjPfWlJ//Xq05wwGvzmFsJYKe/DhIDJIXZQrJeCb+TAp9LeHH1H4ZiSzO5H/lmdY/TXod7YB9np7z6LrpTuRpXsurLPuCMPbMASmKkxlwetEigncgkQTH/ARwwK2/HieCIoAhWgEunbF4Q2NgC/T1DOLaXRNFF+TK4Pn+52I= \ No newline at end of file diff --git a/server/testdata/root.key b/server/testdata/root.key deleted file mode 100644 index 97effe3..0000000 --- a/server/testdata/root.key +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKgIBAAKCAgEAts28f1vwwQVDrXfeL8yNEKsf/dPaCQDMqsReXrxZnqMjkSP6 -yHl87wrtmDkGu2NSrsCrmOuaGnyAy2PhTMRygYSe72mN8ECUMY+HtJ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rndqMZ -xT5sSvkB5CYBeyc8/2DiR99vQFiltEEW8Km3jfMBDe9XoYF33OU+mwYqfS+1B2HA -o3DftFHAgE1uuPVGIIwM3oFTLvzVP18EG7Ts+mUUUzP5+alXwoob0i8vM/weeH/N -0LNqqeQPC2dkMSTJ1rVhbyQNIn3b3wVcji6W+lLLuq8bBDmI0IgRWL5AFVO7O24p -GFkrLwKCAQEAnmJU3jv3F1hVVHuzHe5UWBbeTZE9zQkdq1aKzG8sdG0LgUmp+yBq -CR+xJPh3SMLrW7O1T691iHdS25eydZy/A3Lbcz+CMxwnEZDNaLsk6jI3KSwoCjkt -vn/Uok0j/R/Mb2yQJ8jh6aOjPiYyrZLfftZlZizjFBMt6yFgDPhejl6R1JEEHqZ8 -m28d30/pFZL/+M0pY1tP+GcQRtDrSPaBZ0vW5/UQZACkMl0vAcV/r3K7BesVLDu4 -bbS5OrY/zep8bRUFq+coH+gCNjWKvqaznCnVl8QDao5EWIU9DZ6ilkyNv/IHpkZb -tbSz6TQhspIGc8Wk4nb5Oc1UOfwnrDQ7zQKCAQEAz3JmYYBLiiFYYo6essdnlkWQ -t8MR8QfhqJtG4x6+9mQqqCKaNnSrSp59CK8JiGDb5aXz29jAvecejxyHHtmkml6Q -MrxTpUgz8QDSLwZxm3/pbwlxC85crYVDmKBNkLackfLHkuoX4dyza6XesJshCyxZ -jcxuH7ji7IrnDsTPkZXG/nodv0TMragvndphW/3KyfW7YkmSQQz2h2qNBYCaBIys -LVAaLQX1srtpoQoGKWic4tWm6Hm3pmF2c2/Pa34C2CLyOZ2eDUOZfmxs0BxcMX5R -f/z5HB5PX+mILWjBLaA1+Y1dcKatkp3hu1dnLmqWM6GMxi0/thdIZSh55etkMA== ------END RSA PRIVATE KEY----- diff --git a/server/testdata/root.pem b/server/testdata/root.pem deleted file mode 100644 index 6a96054..0000000 --- a/server/testdata/root.pem +++ /dev/null @@ -1,32 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIFiTCCA3GgAwIBAgIUC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