Skip to content

Commit

Permalink
Updates PQ certificate test.
Browse files Browse the repository at this point in the history
  • Loading branch information
armfazh committed Jul 6, 2022
1 parent f96f95d commit c05acd5
Showing 1 changed file with 37 additions and 6 deletions.
43 changes: 37 additions & 6 deletions src/crypto/tls/tls_cf_circl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
package tls

import (
"circl/sign"
"circl/sign/eddilithium3"
"crypto/rand"
"crypto/x509"
"crypto/x509/pkix"
"fmt"
"math/big"
"testing"
"time"
)

func TestPQSignatureSchemes(t *testing.T) {
pqCert := Certificate{
Certificate: [][]byte{testPQCertificate},
PrivateKey: testPQPrivateKey,
}
pqCert := createPQCert(t, eddilithium3.Scheme())
rsaCert := Certificate{
Certificate: [][]byte{testRSACertificate},
PrivateKey: testRSAPrivateKey,
Expand Down Expand Up @@ -97,6 +100,34 @@ func TestPQSignatureSchemes(t *testing.T) {
}
}

var testPQCertificate = fromHex("3082119b308206b7a003020102021100dcfe475ba9670b65536752b4054ee652300c060a2b0601040182da4b2d0930123110300e060355040a130741636d6520436f301e170d3232303131333138313935395a170d3332303131313138313935395a30123110300e060355040a130741636d6520436f308205f3300c060a2b0601040182da4b2d09038205e100fcc059e508eb17c4fc4315cb63eba0caa46e85749d258aab5d8f5c495c7e254864e6592c0b8901cbe4dbeda131b7e7d20ecc985b9dd18d6f25ba2acb5fcd4dc76cd6ee812fb08bc130cd081ef0e9106cb80a1b2545479e8c5ebe67abcdfbe575217df6dd5f82d44ac6f2716d01fbbf924c867540d22a33a5aea442f9008db74ca3a7a9b3da7fe6fdfffcea01786c3bea5f757864bcd2987afe1265a7b8773755737245cd94089768ce600d36e3e9bb0165e401e353791cb42ed036b05598a8a7e1617e79905d1c29467dad34934a8e8ac8744c92bc60750cf2620433c3e44e8122235a00d63809e626932378edcf6e56d2c4812f387b68d0b47e2c0b0f7060f1240737be93ee77889e5e730ba1323da4ed601fd7b6de4a180fa0ae7990c5c6da5f951bbe79a785611d3c7383421810e9241fb7fbb272165b7e46f8e95c553ec36caf4dcc3dd961fb268e7e11ead54a4f34efc1d213f7ae9ca26c534dff23ea0bf4355bf12cd7ebe3a1c2b2c9714728692b57c292009a7427841e5cf831947b980375b1368ddc9e70466547176ad6fd26d00cf668fe3dd3b4507cc4247b27bb373cb33ce798cec9502b519c8d780fc1ab7763324a4b61468da7694270c018b07179d52c5cf02b5c05612f01b98cc998b17dbf58a1ba6f74ab88200ceca95ad1ec90a0167a3f1a7b3e94099b5bd7c997d648d62cdc7b07cd6f29369c2340f99626694017a279ec876c76011108648d466e3c62ddb113797484b034e76da2d86795fd0b2ca071c60f6a76b01bf055d83d4ba02e5ec703729740a6c6c0d580cd61d35a50a40b081c339b67eae77ec122dcc4c25af0ca3c4dc59cd54261a9da3ffb1557cd46427b3512e5e0524be19c2dceb92efdb66ad050afda00bba37fc89ac113a9a05772d3fd4ce50916e4d71f2c9b779d8b69b3f2f6729a8a920aff1783a92af6d4efdd2e72fa60b62c486fc389ac076f75122fc8a79211920e878d6a910288743c0cd0323a5c90fe67145a7fb237af3912636f63a521e2fef497c4e9b57b971f8d985be09969611cd70ccc8cda4221e687e709e3ce06b8e09fd70758a96c88c5065dee6bee9600ca8e6f40a3f34be21e01c430108a7bf2d92c794efbabe6f9ac3a17838a851a858f479ad86b07b43727a844c33f6551fef761d7c654fd0ca29fd142f081ae6e9380372031b33d691941302792a29ce48d488880315492a107ec7033b16715cc38cb062ef19c89685dca5ac4d9a5f18159dc607b08c9e63d4dd81b27a3779ad1f1b4b5be96aa4762dde46253bf1f116698d59047e57d38845935405735aa178a4fbcc0c0ab9165a3bd0a97ce2827e2901edd77d7ff2b9780b18560982ecd4779bc98f627664e17241a60ec9327bca96f4ade5893e9c541eb9464b3eb29843b9375cc2b5761e51010ccec11218878b587d968143cd07a5451ccbbf9a41eaf3a7c6a128aec6f720b655fa41e20fce133b4a91b14457870a97da0d41c7d4ee6d4f71b6831f26e8e6059ce2ae56081531cf399ed4195a02c092a118a87f67fd23de6dc8761e2a4c54f4e04960f774c687d299e54c918db6b299216bea427618304d0187e43c1f0c9e9aab273eadee8e5e381f167c073de2ff01b7064e55a4c33d09eb6aa7ee7e56291d331bba45c2a6003d5d8547880a66be8ce2e1d1ef663b9afe0dafb4b33cedfd045dc4e59feb927c8b3d4ccee9848c0362f9097b5e548cdabacc1d0b6a8432076cc07b29791307d23a725c85ea15f0fa90dc342987dd833eebdf5fa8c46a5ce10a18d14c8c4dada9ab28ec3b4012b9168b5b8984c8aec99a3f91ca751c152b599f67585f97e3d592a45e880f5057121b46d04397fdc860a60676515c90fa1e3cfd85f90250325f1fcba3fcbec258727b9349279ef7305645516b4460e20f8ddabdcf752f3c9e861151d2ed4f5b4e6a0099b357e4c97a0a16885353e417dad9e299371c9083b6b66dee667def2c11c255bbd58a6de057f6d42abbf9683f414d888591fc97a802e6888addbaffc5c32bf8e96a10ef3f20f441df4e63187decb15fcf0f31ea605fbb1fcb4960b1aaae703f1de91254dc81c027abae221fca54e1dfe35e13fc2bbd0b1e390f2803bea8e3297cfdea350304e300e0603551d0f0101ff04040302078030130603551d25040c300a06082b06010505070301300c0603551d130101ff0402300030190603551d1104123010820e6578616d706c652e676f6c616e67300c060a2b0601040182da4b2d0903820ace001b3b18de8a35b8501b600f0a30355d15b72ddc6977b9fa514f2c5e0ee3adb7bf629252b19ce98f87e1f932ddb968773baa84443bd961fb758661aecf4fcc367f1670c85548220ca54c72a93d1195b5777c8de3c0590028d7708867c0eff7b3073f82138163ff1a4ffb841b883da71ead883942380883df3815554f2d3b3207d16d787739a1fb59b82e1245f90b8fc06373c2ee945a6db8811412667844db8eea7abfdb4d9855343e7207f93f0cb58589cd9ecfb19c1805396c857279bf4e894e484e5fd612a4d016d53c2bfd8f288205376f4ee4073531323dcbace6101b1e9d49a4584796c1df351ce8bdd9f416b27eeac103845d23098d5d7671b5bfdbb478aa44007cd7ae99647152fe9bd63fbfa01fabab53baa5d40de416eb67b74aeec165b0a1b1cff6584767f3cb714c3bb7304a572db188db5983d580f3ecd32ad74028880d0929f60f2ac89ae90fcebcee42017309ac82cac34543de7b81492426d9ae78203727544b09a345fa86f53f6ac16c1dad6bfe3b4ce484c533c8bb85c4c5b9e9892291df7afa336640acfaccfdcedb5c586b1631b47447cd7705c38f657c1d67769ea39e3f3a36c82da9d0c1c4c0b679e2e8145c2ad240a0fff9d1b1d2ac77cae88edc3250dc58377a31afd3f1e2ed5cab0d6fbaf44a1a4c31ab116e302bcbb359ed090ea2e74cde2c7b4785f35aa2a74c222208ae7466a5a9266a852a1e3416a83b40cc25de486f894369cd10fd71b07450ee158dfb864e12247cb9104e39a20997fa8d557029c00fa657f284642303f4d1172084de9a3d6c1882b2be0270f70d2c97ed4db96d43deb3acde04130976a266e600ebf508cf3befd76381ed90616c10594b15fc4cf07b1e08cf1e311dc04dc5f34772a3d28d96f6b11e7d38eae547b3e4f599f8be9422e33fb82e3c650f1aa810630c027f3c11bfdce0c588c4b90f6743cd1e9b3bc4608c522aac5c3693151235447094dd2567840a3808b2dac8e9d4cd7634780a61bf2d86bc26b5502666902b1ad3fbecb790a125dbf654309c700846f0acc392ac3f219a14c76deba70a30cf918592515985b5d68a0e0a97beffaf392128d169619fcdea4d5a490a2a6a17f9b750d20da7e4f88ca914ad668ee62c84352d7fed6da39fb9fe9fba4ddfbfaefa65a39fb6e93f7deb48ee6c972ec03eeb080836bbebb0e65bbb255613fd16c93a86979f6e7853cb19e92a2a0666e8de3407b65a5f7745c18e7b95e16a112221e3882920928141ea3cacf17073513b81c6bf216dcaf90639cbd8c26f4c5d3cdfdf23548cc6a0c48e76def0027c9e6bde561f27854b7e376abc3ba40ac18ca13ba6095e2be7981625729218fcd56c2c7b972eda020524a8591cf3c2bda417a2c87e8e9c4f0dbe16bb5e21ae3884b16bbed1fb7b52fa36d4f36f93a4470763c28b450f8a4e59373a96580f260a307dca2e2f18adcd2992eebb8d3a4e534b98d544cf9175a05c067184b1718b39840710cab34fff00315468231c8290558b657da27685294d1651c89ba19d79ed10c9d857137d386db006ee1da70a434ce7c1c1b4264a0adba24edaba0bdcd4bb953fa72bdfc09b49a4326734826c1e31a53f796c0f575fd9b666528dea5d75d48783042e65a3f2c6b05ce83238818f2cd298b1dceb1c7b050a25761335aa19ab10c8d98bb8cc78d7b21b1a9ba9dc2ec4048a2af4e6044d0fd5e7d2adae2e4709a1cc591a59a3fdf265ca8aeb6440826387c858dffe472dea6b42beff39d0f5f06a01d8706c3e4a144e52df694eadd9c82c014ce5260aeb5be5f080448cabc2cd23d6acc77ff4ebc340164f7576b2c9234ea91ddc7cb63a56d4e694b295f3dea3a8a44fb8409ebc6c302961342aea17f7e1fb0408d2017e09da91fb6a09aa304786c36f22bf9c0e02bcbb28a766171602a4012e94c2cd4abb59b5dd894aadfdfad2c07ca7b4a267b140670908e28be95f065016d329415fd783c0024e42eaa16a337602a4683be4da40eabea1679650d6a32a923a6808209780e951c15380c079c0be919769a8b8d9ca2819b45c0a1f92ceeccfec91a00f7be717d22f075727f0b477f1176fecc5f8c6ffdc9e17b041f08305935cdbfc259cc3f78b9a3edf6fa1ac89a5cff242df1af3550e9aed6d5359f801b39dae0df4f16aeecb53227d1d1f0d2e54456433331282e39dbf102e8a21af071f1f68badec46600e1fc99510a81254327a9137b001c47a3eb156f629b116fcf31e269a8fd586f49f66a96b1733a2b8db11bff8ef5c8b407e30f03048f08a6e9447734df356598e0db1b1795328458bfddd7ae594db6e407509a0642882319212f152739564312e3149ebdbb7ea898e95017279cde338607165342b2bf74f51099bc6ec1169aa56b05b36288008914263b85b90016c1ef70ee9911a6db632df1119d7e0879cd416bb043b18a81d272f4eb564102f6d2a9ecc910bdec36b13d0bef15b30e67fc5d7bfbce271b9ba1ddea22bb360723ae0ff4d5be07ad4c2625bfc354ad6afcc78ec911a15b0dceec2e559197bc54e18f7d454c1fc6eb7de4c0def633470574ae617fb2caec3b16387952eabfd3d431fd4dbbf485fc18f261673908d9a2a5c036255c37802eca5876025efa823ffc9cad50b5c19877c617a0e4fbdf24f60bcfd297cfec6ccf40ebdfb71c9a9ec99250c01ef0aa6400ca74963b72c2928ef1cf79e851f095a631fb9928491a62cbb81deeed989508c6da5b331417943c5d2c4a2fa15069712b7644dada55adbbaa8ad550a0797d6a74aa855749ce903ca2b8ce211ebce9f1137c24a9e2d012e9ed509cfe0a3e2ad5bdd9c88ff8bb675acad7295bffb2bf0ca6eac0d0c5860d67b0916e30d4cfb39fb6c6198d2100c88ae926da1bc58c271b09f5bdd1e31c28da932df7c8c391bb988183c914895aded2a4db44fe0ee865acda2a6a69b17820669ece7bf5f1ea21cacf2f6d485631e832f86b11db78fb5fa9944efe4217f803cfe4eb40ce0fa206b132989585983d2313af2a8746bdee0daa0863f6e1301b280736b7c01ff8e0d68856339503ce80de15f21dee964df3d9caa88a210213bdb1f85935214287d96083a9c670daad086ec6d712895cf98ec61ed84529a72ee6c7b1023e0ef0d721597d524eef57940ba9406ed4800ec9296bdf346938dc09aee6d84224e5e05159dff366d75c55056b337831461fadcef8da0b23d3fba090b56e14ab0d0dd5050d5412c0f4ebe9e5e704ac29ae87f5d1b1463cb8036232866835364144cd0a7e06ef8eccde4cb1ee6c0d50d622f89912e92a9480de9e7646fb73fe3a7bd3170fefef714b9aae8f1812fd132ebd141eff4feef72fde7dc0a8c31518f6ca11f0e76e700f1077b3a39f00987a01df63ad8dabfa821635b4f70abe3dd21988df97b40363c108b9e58e08c8df9bc9faca05827c39544f5fbea2f3b99a9a7c59c2341c951dc45d0c7105dbe75095b8a65321578a23058c92b05a4ce2e8e6c314c860963e3b79fe4d9fd8f1add56fe1c6a58a8b41afcf2992d617a26d31e31bfda93ff05345d10251724f6d0aff7ceefef16ad8e0997a0743b67dd1fdde461250f5fe8080aa25094b87a0cb96f51ab0c3c3a0348761a1ff2a02ac0a1b3f4f517f9cb2bbd0e5f7010e25293235404f9097b1b7bfc4ec3c65678ba2b9c8e3eb2a2d52585b636a6e748021373a4d6f79afb2fb00000000000000000000000000000000000000000000000000000000000000000000000000000000000c1b242e3780881101204c21080040d09308208a8000a00101bc4820f30a0480054742a100d81ff292f5f1f005e672da86a98ab035e091af8c638054bd8bcd870619b39c33d84659d328af94686da95e1e6158451d04e991382323df3f05b6118df461ba4a41824e7cf67cc406")
func createPQCert(t *testing.T, sch sign.Scheme) Certificate {
seed := make([]byte, sch.SeedSize())
pub, priv := sch.DeriveKey(seed)

serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
notBefore := time.Now()
notAfter := notBefore.Add(365 * 24 * time.Hour)

template := &x509.Certificate{
SerialNumber: serialNumber,
Subject: pkix.Name{
Organization: []string{"Acme Co"},
},
NotBefore: notBefore,
NotAfter: notAfter,
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
BasicConstraintsValid: true,
}

var testPQPrivateKey, _ = x509.ParsePKCS8PrivateKey(fromHex("30820de9020100300c060a2b0601040182da4b2d0904820dd404820dd0fcc059e508eb17c4fc4315cb63eba0caa46e85749d258aab5d8f5c495c7e254892e2dd1b9a43c2b4481295b93e24526a07c8608ab8071abc1294bd40eab97666b23899759718d55b0ec67cebc00b1837519d9d7d4ec7551e4e06f1b920027b6939196a11890c588d6817e200d42556e87246275950088879335968240607907379383566a588039668009434838798a02998576078376162698a2285099722034276937a8765a56a52956102790363164a406a0a458564947590355163488634a07a166766468051597a669674257568316229335a09009682a832456766195a30a36965682355942772a9385a296312149040a7a962381087a570023a72360130a6a75093379197325a94a42643601448475a006352958374149496596134539758875a48a1a18222863a03278722aa5795301896253810662736532417148771203614a4350a5199162a9960a8114a8a26286590702013426a6a698a62955344227187114703928126552738202183a778748a870931027586560a25348156a4835643111085a1484134833983455593a188274418a5538964379676565a209a273448184a83186706a399727376452759a927a571202954953062811093832236574182082947a211a71411697897720826192a47123924864074732a62378418462570720a957aa65319a773243162276389706501623176069a52507466718a387462618456a0229a290769920163520484163593627479a09690365887a76696855a51418a603653388391229a11728a396426249351535357195585175330759601260984915879a71a6129a7241812a7478811005a33159732842930506569191a890066584a944050394a3205527a12067a29914a93911098973575248420374117633342a27713334038070973199aa995219363680a50283261567639403472303a13035762a83676034219497579aa165026a99158a380648024113a23303990036576a6330939a69424733194452247a3033429763393569777399907a60a405a5613a15369a7499870034370980a0404621a0744a20499551572579996a07a160245a98005a8063764689601287a5325134948249a88327133922a754a66806353555957a6017791746524516982a359044a0689175731079704885a9692034a56275697118649708068211483a4330a0191a264566374a9387a372452692aa038894a687610296932750839059995a7974110888a762364a42464641a8334123995138a169261484a75a296065a829928957a35124832a383427112604981751a745196347508a2259735974a89573899a9a34408969712083a648199088288695433281696507a16117846a390508a83a7366224056a7326145a6a31a479429a4619194a7105262aa2605a30968512502655930894162103a07a7a29658252497a5a8302348a3446536033863614366883729a64428842990689a127482734215748a11129009873389474a165752921217717a40016656063648513562855a8576836aa5a89290a662358aa11147a96428668211a6a40039a9a07744664447587a01a4618a20a21389024a1291045a5a04a522797879306aa90669727367540a09875a01a2632441016217a607a43a5636a1a369787967326a74184a9180179965974618501446349094502211728a8593143017381678a8522158211836867129833a739904412aa408a683794114a8695292316724412068889169547973590542703534376007e544d31eed08b98fb5fa1fd66c428a297811270fe0d8c2863b4add575357c0e42c2e39b7573f1d6e1e699ab5826eaef3bfadf19f5838fbff5eae76691b74007f4e896c1c979783e5563a4a111186a6369253417cebcc9ec429e022a6fcfa68a01d1de079d5dd5775ac2e01aa032ed50e4d9a70e7583b1ffe560db36938a75b538ce26cd7737a25f65015dad772c891064a93eeb45eae60d449e83fffdf617a5522ac1d471b793b34f6b166a42674faf08e0642ee17a3749018d0f56cf87d6bcb5bed5921cf3c6421f9a25efe84ebbaac8bb2074f677d0c44ee212b856e38caa52c0b7c1908d7c96cc2c4b8750e4bdd9e5359b1c5dcd8dcd3d37263e5f00f777247e68b52ba4a72bd83600d0d3c22f7707cfe5fb0c12abcde4ba9769cf6be5260bebdbae598cb1043300bde2f8f0b4b390c802d44e98bdaeba0edf3d9e8f2c09f3c21a1da2aa6f856135ee473a68e85bd7ddfca0899b390e70d36f8a27a8bc05cba3291f5515d87c486cb721aec4d126e818619bf9e1cc097031a3e7c731ae3a75dbd44b4ad4a6fff4ecbd36148940c08c0b92ad9e46e900f6ad3fc0376f6251071b620d174ae05bcc679b984266a53d7061cc18edee3ac9eb5b2afec38c1fd84d4527fa4b098fc3fe2ba5479ccbf1ec8e88f7eabc152dc40abebb822bad84f8a5bb8a7f7f7a7cc6fd209834916e799818ba1a5331676a666520e1b9aa51b1911f8bd723e51e50e6570f5d2e50d0f651e3a9fda61a4c9b00a2e6270282471db759ca491428e0f22635b10c76db7d2bc0ebfaf99b9797802505095d6390e1d204d6c9317ef15dcb40a1290ea378b1555337dfee9357783b661cada7e9ebe04bd79448159c6a4546e9e10b153b0b4aa0b47c6d0e96493cb5172d57c9ce88a3c7a0390bba70d0da0e7e99198d937422919f8c3de179beb0d8052c067d33dbbd45275d619e35c9de6fc22d315a4e422d82b04930c75a90ef0f980e3a242aa6b4ec84bcf784ddb15edc63b66b61c2ac5a30f8962e09bead3d0bac4b93f801590acd8ebe8e316cbfe2da976526b030281c44517548bb5c2b55e5b662cdcb26559769dec8406eb3033bd0a5713d6b1b98e57519de1bfe75d5ce7589027b795b635065ec75b65e8959f0ca6e1ddf789bcdd4b143d3d3cd3126165983a112893867fbd7fd902791a12ed73f96ef0e173fc689e4a872fa50838d290139f024d0cfce71f1f5b8aab37464f799da4fd64e1b1e05d6182828a2d2bc7f9a1384eed31b9592ee7d4bd28b2456d086ced67313aad1d85ceba5514174fb7711638e6313a9d2e5156e6212aee7f400ae157e37cdec7ee60ee996d8aa2ab274c1b5530379f89965a42c72c84ddebf5bd84cfede27b87c174a108bbb2fa5177bc46818c8c816262065ee2234de6879d4acb582b095fa0118fcf0c0b5ec665a6582ba77b7a39d5e58cd6585ed6a2024f88b9b9c2695ae580ef709e16eae39e3e3bc977605b83d05e6e9b51100215890e8c95c1f50f52d5664b33ea7d2d9067e9476fef68a0f1baa56cc3917d2cf0eb198c0c77836e64d3a4028c851b9fad3c75d4434cd8a90464cae7e33ce95f05a21a474e9fb0066de3b73728c9be169a1f4f289937839c10647d07beacdca0b57db3157fe71a26adb827c718342744ec5e352f58bdab5e2f8c12476155b81023e07d1ca4f24c9f8629afaa54be65fa37604e7ab1313f129303fa4445a57291dd7a533c70bb82899fc40a0880e7ebb152139a2882f919b194950bccc0c296ca62c62a955d6582beabbee70f4b6d430038417291c90b539b98acdca3a63179f38eaf422b7ecd0b31c1cd42afa60520d12dc88f41aa9d16c39418b9b6715ef0714e5484724c86334a5242cb3bee6d9c6d7ed620084f0885e5b2c090279c27522cfbeef1c0909585af866d7c45a0f54aaad25ddca4b722c92810d959114f63d462298bca9c05ca0827bd145ead1a54582d286dbb221447ac15b9309d2ad7d460fb01b7aeeaf45f73048f954e91499863b28aacb4591553d63b3a376669cb99ac53f808a715554fe9ef24ab2dafaf19ba0848a92d8a84cd1159ab7eb1cb01892cfaa428a60c7c58c6e7eeba84f10be74a4d5b3610119c1e1aa1c353596dda0d79e54b793e37fd531ec21f1450ee176096395d976579cbe91dac7920af0f21a2386d0805eefec2efaf7afeed0f2734e5e602f5f2e5db90703f371edcb02b952d9d742d50ac479a80a79f89f99d0ea9a9d9768e33f28ddfca476ced94abf087a59feab0b8c4d7973109fb90c8c724c5f3d73a82a76a646b8b3782926ea9429528df1358b04828a615b94e2da5ee0fbe15a9b6107b08ea21faa31e45047fd682c722cf36a6379900e8a523d302dfc69f4cd00fde060799498150188be595e0e488a85b80bfd6fae8c7226c0336bd2922132663b39ca85141ff634651ea8c10be11d62cf9d7c6a9f9bb729d74e2dba2f95b332e7326172e4aa945b629c5aea4713c41c862452ecb07d39dd6f0b47a8134e7307e99c77e5d80558dcf80ef3fa2954a8c124fb61c74f8b451a72f904a5b42af81ba7e966b88d5a361dc6df8213e265c01edf65b93bd1e363243065f0d92cf7939db3f52c5ed56e9e4cc11f05a74a7abe373a4584c5606450da99538cb2ba67dd4cf35243ea37258d5dcc2a507f1523fe3327798c5e24a31394f8521652ce4f386d2089ae3baebfa34b245a0148ed15932a6922e5cae10db8f61537f5aace9f54ea7befd98496e2d1a05ba85d5d9628ffe83310ac6e032d13cbe9c9d59fbd0ff6aaf16581c05648b328e24097e851c16338532deb2f4c617b8812a3d3c8a0dcca8ef7ae7040ffefd59ca29fcd55b774e085c3cf8baacc58821079a7037a03a694fbb541fc848933da82bb468c521d2688ecdcaf9981d99375c691d9dc7a7891a114c220246eecc604b421c9e00441a9460b344d810263458b477c1e7cbde1d338cda7ae56c494d23c462fe96e53654465dd2d700aef6cf7da7dccdf5873275d220038670a98db14018feaf34b95825fe499d47f9909637638b8a033c089e95e6872630072db78c8ef673841219acc143d29148add735063f5a40e92c9ee20c565074a7e53f786e5a28093ff8cbb6d3aefb813374b671ab0a1d27ac9187e7ad8283522ed1792698504a218ea2ead18480951f77b71ebe94bc0a33ea6d33f79e3e82935e4ab927e78318f8b924ce222dd"))
cert, err := x509.CreateCertificate(rand.Reader, template, template, pub, priv)
if err != nil {
t.Fatal(err)
}

return Certificate{
Certificate: [][]byte{cert},
PrivateKey: priv,
}
}

0 comments on commit c05acd5

Please sign in to comment.