--[[----------------------------------------------------------------------------

WFTestCertificateAuthority.lua

--------------------------------------------------------------------------------

ADOBE CONFIDENTIAL
------------------
Copyright 2019 Adobe Systems Incorporated
All Rights Reserved.

NOTICE: All information contained herein is, and remain the property of
Adobe Systems Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Adobe Systems
Incorporated and its suppliers and may be covered by U.S. and Foreign
Patents, patents in process, and are protected by trade secret or copyright
law.  Dissemination of this information or reproduction of this material is
strictly forbidden unless prior written permission is obtained from
Adobe Systems Incorporated.

------------------------------------------------------------------------------]]

local WFCrypto = require "WFCrypto"

--------------------------------------------------------------------------------

local WFTestCertificateAuthority = {}

-- This is the private key for the Adobe test CA that is only used 
-- within the WF self_tests

function WFTestCertificateAuthority.privateKey()

	return [[-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQDn0iZ28yWzTXui
GUPlKukfigWXSBVYb9Jg/ugO9isYVKsTPO6hct2TYqe0Gb2cikDj7lWdqQOYz1IG
DS+TtB1Nv9mqEKqrXJduWac0rkXCZ8h3gMuN9omZag6ZX1oVj2MY67bQXnsAImGe
QTmawZ/cvWFWcyw3TI4Y4PK88vMFJVa7uoJ7VJ3Ede5uQn065pOOXZ8lnwoWhfLk
Jpuxw6N1dOIIEU5M1V36n8yAQhlvKL/pPormtLKBmSCipz4YcEc9UBLZlqp87P0m
wcz1q9wwDptWK6i+/eq6Xm7cxr7QENh6qxFKIrrSjiHFXh4sHZa4eu6sd7RDZoxu
vJhYB+k9X/PQiH/DNV66f423CAsdOvV/79Z3q7JiHvRYefXoacZiYrOyYx03/0dd
fqO7JMqTZKe3HzSC8G9T7Tcu0E3pCMnutf4AVOQCTZaWtJumtkFlTBRhhOtk6QTA
LEAhuaGrN7O0lsaGLZ0SzUK3cLzUNpe86MO5xnhCbvkydfXqZL9YXTfGUVZ3Zpn6
4q3oDfJ04JrU2TTaPj+Ef2mcDwQjpF+npC3osa6FxYR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du/OOqcf/bf/6QdHCqlr4DElV1QBjL2wvVxVK
RtIRPAaMvGV8FV5a22cBnU59FkHNzDdcybXhyltURMGlFXB/7kt4SemS3D4PPeLH
fGyjAoIBADIBrTXD/oLL/IaP3VAulyf6usxVNkfEgmV+LZw583ZbXs9M3eghljf7
onYndDDVgkBzYLMHtu9Y9udfS+JY21rNb7FtRqtLjhgVzgP6M5SyxcNqLJzw+EiX
hGwy1Gj5Qmo7kcHYk/dPdls9ERFLgv2JEdaDyUFwz72U0iez2VTgfLmqCkdwwKLa
QpXmt/xxCgT9ZqiRBtJIT1jIS3eHubgVSvTPMYU3TiDmzDek91PsaQVmSS6o3xlz
tZ7kXcE6jwB/j5P8lMh34/jSzlPLQhO280RpFMwUYzTKaO21nhh46sdZTNbx6qoN
Q+fu1UkfuZX+Bnx75n0Km181YQjMklM=
-----END PRIVATE KEY-----
]]
end

--------------------------------------------------------------------------------

-- To manually inspect the certificate, use openssl x509 -in cert.pem -text -noout

function WFTestCertificateAuthority.certificate()

	return WFCrypto.WFCertificate([[-----BEGIN CERTIFICATE-----
MIIGNzCCBB+gAwIBAgIJAMEG7JAzKweFMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEbMBkGA1UECgwSQWRvYmUgU3lz
dGVtcyBJbmMuMRgwFgYDVQQLDA9EaWdpdGFsIEltYWdpbmcxETAPBgNVBAcMCFNh
biBKb3NlMSAwHgYDVQQDDBdMaWdodHJvb20gcDJwIHRlc3Qgcm9vdDAeFw0yMDA0
MDExMzM3MTRaFw0zMDAzMzAxMzM3MTRaMIGOMQswCQYDVQQGEwJVUzETMBEGA1UE
CAwKQ2FsaWZvcm5pYTEbMBkGA1UECgwSQWRvYmUgU3lzdGVtcyBJbmMuMRgwFgYD
VQQLDA9EaWdpdGFsIEltYWdpbmcxETAPBgNVBAcMCFNhbiBKb3NlMSAwHgYDVQQD
DBdMaWdodHJvb20gcDJwIHRlc3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HRjt56Ge/sFUalNArJTIUHwgiNxiRgAme0nU/bAmv64MNMPcpLMw/LUht
jo/DdorFSO36rAogfCCpobrC6zw07TnlWLFOqu9fV67yVbnaL2aJOaCkeQJdRCRB
nEwIor9a615vOMv7T8KSyhtw6fddtqSGZ/atODLGjTNiwStXewUbaGLTFnWdOyJT
NZk6Q+G0yeJXyOlOmqHLGcABZG+fUVGMjEaH2963MVMsH1vjIw9W5rGt7g2R0jUo
ZbyIbFoCNhErpCcPcLt6VCk4NEEU4Lu9/kH5lBqnBRWZkD/8cXWnRkvCUPOegMgq
ujklU4+U9/iciOGZMLdRY6BLXkdfws5LKrIIFZ8Hu2oqRM/iJwtKOfuPbWPfsjAe
gtAmvdBirNirXPx3Ph+KzSHbiZKhNBompFhUemS+fCaRUJUx5BQCuKc3z7+5i76K
0udWHWGitEQPkjX+9MJmMPmG7TF7tfVgUBppUTSM18yhkD3lP72f/H/e9W0rDs6u
UM6Kh8K29TLOpyBGyACU1jp7a7tfQ3R/bplOuSDjdby0cKTa+ONr1sl5aIuHmUEr
iVDedu5vnl7onCo=
-----END CERTIFICATE-----
]])
end

--------------------------------------------------------------------------------

return WFTestCertificateAuthority
