aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_crypto_spec.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-07-02 12:36:52 +0100
committerMatthew Wild <mwild1@gmail.com>2022-07-02 12:36:52 +0100
commit4d94a62f9b6f1a5e7f89a2204ffb7697d9018a9f (patch)
tree72a6a283b7c8fc718bf6e0383401c0ad4be90d16 /spec/util_crypto_spec.lua
parent0b0555c3390287d2416485b1549186a282c6d1b1 (diff)
downloadprosody-4d94a62f9b6f1a5e7f89a2204ffb7697d9018a9f.tar.gz
prosody-4d94a62f9b6f1a5e7f89a2204ffb7697d9018a9f.zip
spec: Move test crypto keys to a shared file for clarity and easy maintenance
Diffstat (limited to 'spec/util_crypto_spec.lua')
-rw-r--r--spec/util_crypto_spec.lua30
1 files changed, 1 insertions, 29 deletions
diff --git a/spec/util_crypto_spec.lua b/spec/util_crypto_spec.lua
index 19af1395..14c35188 100644
--- a/spec/util_crypto_spec.lua
+++ b/spec/util_crypto_spec.lua
@@ -1,32 +1,4 @@
-local test_keys = {
- ecdsa_private_pem = [[
------BEGIN PRIVATE KEY-----
-MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg7taVK6bPtPz4ah32
-aD9CfvOah5omBxRVtzypwQXvZeahRANCAAQpKFeNIy27+lVo6bJslO6r2ty5rlb5
-xEiCx8GrrbJ8S7b5IPZCS7OrBaO2iqgOf7NMsgO12eLCfMZRnA+gCC34
------END PRIVATE KEY-----
-]];
-
- ecdsa_public_pem = [[
------BEGIN PUBLIC KEY-----
-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEKShXjSMtu/pVaOmybJTuq9rcua5W
-+cRIgsfBq62yfEu2+SD2QkuzqwWjtoqoDn+zTLIDtdniwnzGUZwPoAgt+A==
------END PUBLIC KEY-----
-]];
-
- eddsa_private_pem = [[
------BEGIN PRIVATE KEY-----
-MC4CAQAwBQYDK2VwBCIEIOmrajEfnqdzdJzkJ4irQMCGbYRqrl0RlwPHIw+a5b7M
------END PRIVATE KEY-----
-]];
-
- eddsa_public_pem = [[
------BEGIN PUBLIC KEY-----
-MCowBQYDK2VwAyEAFipbSXeGvPVK7eA4+hIOdutZTUUyXswVSbMGi0j1QKE=
------END PUBLIC KEY-----
-]];
-
-};
+local test_keys = require "spec.inputs.test_keys";
describe("util.crypto", function ()
local crypto = require "util.crypto";