Skip to content

Commit

Permalink
Add cert file for test
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <[email protected]>
  • Loading branch information
ganmacs committed Jan 22, 2020
1 parent 688c36b commit 1f80633
Show file tree
Hide file tree
Showing 13 changed files with 407 additions and 0 deletions.
114 changes: 114 additions & 0 deletions test/plugin_helper/data/cert/generate_cert.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
require 'fluent/plugin_helper/cert_option'
require 'fileutils'

module CertUtil
extend Fluent::PluginHelper::CertOption
end

WITHOUT_CA_DIR = './without_ca'.freeze
WITH_CA_DIR = './with_ca'.freeze

CA_OPTION = {
private_key_length: 2048,
country: 'US',
state: 'CA',
locality: 'Mountain View',
common_name: 'ca.testing.fluentd.org',
expiration: 30 * 86400,
digest: :sha256,
}

SERVER_OPTION = {
private_key_length: 2048,
country: 'US',
state: 'CA',
locality: 'Mountain View',
common_name: 'server.testing.fluentd.org',
expiration: 30 * 86400,
digest: :sha256,
}

def write_cert_and_key(cert_path, cert, key_path, key, passphrase)
File.open(cert_path, 'w') { |f| f.write(cert.to_pem) }

# Write the secret key (raw or encrypted by AES256) in PEM format
key_str = passphrase ? key.export(OpenSSL::Cipher.new('AES-256-CBC'), passphrase) : key.export
File.open(key_path, 'w') { |f| f.write(key_str) }
File.chmod(0o600, cert_path, key_path)
end

def create_server_pair_signed_by_self(cert_path, private_key_path, passphrase)
cert, key, _ = CertUtil.cert_option_generate_server_pair_self_signed(SERVER_OPTION)
write_cert_and_key(cert_path, cert, private_key_path, key, passphrase)
cert
end

def create_ca_pair_signed_by_self(cert_path, private_key_path, passphrase)
cert, key, _ = CertUtil.cert_option_generate_ca_pair_self_signed(CA_OPTION)
write_cert_and_key(cert_path, cert, private_key_path, key, passphrase)
cert
end

def create_server_pair_signed_by_ca(ca_cert_path, ca_key_path, ca_key_passphrase, cert_path, private_key_path, passphrase)
cert, key, _ = CertUtil.cert_option_generate_server_pair_by_ca(ca_cert_path, ca_key_path, ca_key_passphrase, SERVER_OPTION)
write_cert_and_key(cert_path, cert, private_key_path, key, passphrase)
cert
end

# def create_server_pair_chained_with_root_ca(ca_cert_path, ca_key_path, ca_key_passphrase, cert_path, private_key_path, passphrase)
# root_cert, root_key, _ = CertUtil.cert_option_generate_ca_pair_self_signed(create_ca_options)
# write_cert_and_key(ca_cert_path, root_cert, ca_key_path, root_key, ca_key_passphrase)

# intermediate_ca_options = create_ca_options
# intermediate_ca_options[:common_name] = 'ca2.testing.fluentd.org'
# chain_cert, chain_key = CertUtil.cert_option_generate_pair(intermediate_ca_options, root_cert.subject)
# chain_cert.add_extension OpenSSL::X509::Extension.new('basicConstraints', OpenSSL::ASN1.Sequence([OpenSSL::ASN1::Boolean(true)]))
# chain_cert.sign(root_key, "sha256")

# server_cert, server_key, _ = CertUtil.cert_option_generate_pair(create_server_options, chain_cert.subject)
# server_cert.add_extension OpenSSL::X509::Extension.new('basicConstraints', OpenSSL::ASN1.Sequence([OpenSSL::ASN1::Boolean(false)]))
# server_cert.add_extension OpenSSL::X509::Extension.new('nsCertType', 'server')
# server_cert.sign(chain_key, "sha256")

# # write chained cert
# File.open(cert_path, "w") do |f|
# f.write server_cert.to_pem
# f.write chain_cert.to_pem
# end
# key_str = passphrase ? server_key.export(OpenSSL::Cipher.new("AES-256-CBC"), passphrase) : server_key.export
# File.open(private_key_path, "w"){|f| f.write(key_str) }
# File.chmod(0600, cert_path, private_key_path)
# end

# wihtout CA

def create_without_ca
FileUtils.mkdir_p(WITHOUT_CA_DIR)
cert_path = File.join(WITHOUT_CA_DIR, 'cert.pem')
cert_key_path = File.join(WITHOUT_CA_DIR, 'cert-key.pem')
cert_pass_path = File.join(WITHOUT_CA_DIR, 'cert-pass.pem')
cert_key_pass_path = File.join(WITHOUT_CA_DIR, 'cert-key-pass.pem')

create_server_pair_signed_by_self(cert_path, cert_key_path, nil)
create_server_pair_signed_by_self(cert_pass_path, cert_key_pass_path, 'apple') # with passphrase
end

def create_with_ca
FileUtils.mkdir_p(WITH_CA_DIR)
cert_path = File.join(WITH_CA_DIR, 'cert.pem')
cert_key_path = File.join(WITH_CA_DIR, 'cert-key.pem')
ca_cert_path = File.join(WITH_CA_DIR, 'ca-cert.pem')
ca_key_path = File.join(WITH_CA_DIR, 'ca-cert-key.pem')
create_ca_pair_signed_by_self(ca_cert_path, ca_key_path, nil)
create_server_pair_signed_by_ca(ca_cert_path, ca_key_path, nil, cert_path, cert_key_path, nil)

cert_pass_path = File.join(WITH_CA_DIR, 'cert-pass.pem')
cert_key_pass_path = File.join(WITH_CA_DIR, 'cert-key-pass.pem')
ca_cert_pass_path = File.join(WITH_CA_DIR, 'ca-cert-pass.pem')
ca_key_pass_path = File.join(WITH_CA_DIR, 'ca-cert-key-pass.pem')
create_ca_pair_signed_by_self(ca_cert_pass_path, ca_key_pass_path, 'orange') # with passphrase
create_server_pair_signed_by_ca(ca_cert_pass_path, ca_key_pass_path, 'orange', cert_pass_path, cert_key_pass_path, 'apple')
end

create_without_ca
create_with_ca
30 changes: 30 additions & 0 deletions test/plugin_helper/data/cert/with_ca/ca-cert-key-pass.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,8C5793DC2044D52EF3249993DB56034A

00Ew3GVB6iOesF0uniabI127Yvwdr9auPDb3cFd8saZF29buGkn0L6ZxYJXYdBTn
Yz65W8CH99G7DS8KH5+QJ3SirrQeWIuXDdBZo36RqLoQkOuC8MnPmQVOFCnOOaSP
DrtjQuRX8I8WsEO6WumpAU/phjjQTnPSg3TbzeAFvPpKN116IiW0n8nLOGjo11fu
bNzHZ6Z5Da0BDXJm/P1Zgn8L39jxVLp2bCZnzSIKD+ipWUPs2HWYKLs1Z6V345ME
QBiG8fF2tL3+DARAqVqQ2pd8xkK1m4VMz3ajHdRMkXQj2cJsAkAu+cXsKxbbz9WN
9GV45tlbVYH1VQJyeeVQyC+bDsgq0N6HG8iEoHD4fp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iw
WJgqqz+hj0pi4FKhhucYcsOlPPbc2MAc4WM6gj5UsHYVmeLBtl/jdvQIJLCURkFq
Ya62uq8WDSefPJKLS8D7v8lbmjVubPB/Gi9ZuwjhTIRb0ZxfIXnWsOl8jQUhiXzp
dhGctbAdXLuOCGXK9fbo/9qOonAzRZaGvkNFSaUblLidrzf4QaK1+pKPEfnlwAmS
-----END RSA PRIVATE KEY-----
27 changes: 27 additions & 0 deletions test/plugin_helper/data/cert/with_ca/ca-cert-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAq0TVfjX505ziwYo9P4AvoJ3mipH/EczuXsan5optw/evmJFK
aNw7ZdjZpTl2TA5zWzhHVO87u3eDbA/pLcyGkr9MgiP0R0MzV+H5M2+dqa4sNNDG
KbbEP8sM4zONvn2YOr+nZWG4Z62PF2ZSDa/bUUuNFq077IbIJH9P0Ad3camC1IOJ
WVKi/nJEmrWhO1VUfalcJwV/PZP3uU73UkZ/57A10arsn3UQauR1Lbo9ml4D3Bcy
IuTGmvzdMd57LHETlqtfLPmhBK+wwMzvaaJfve605vTwyVQDd/tOuoHkblwm/qwk
p+qfqpLirQHOC7AhsBDMmpQTWBhE5tUDwZBFTwIDAQABAoIBAA71aCAp3rQY08VL
qaXOMFq679PShJCtcXRdrXR5SrT/ARs2NWWLNrTih7/ikO57pJ+m/rPwYSsyeQwL
J7aUUnymsKv9L+y5ddaLKhTP/tk/GSVTxrsF94YK2glOC2dD2PPooVo9ermzcvf8
O9ZuMZ2cF6qPXth9vSVS6UmmHUyT+N545FladLKhctz6AwXLYaN/yOeHXEsfy71S
v/hkFukDPFpSwXnpgLBTUyZHCw3slUBN6Pk4FwHn1ZtAGmRp5kgvIv+pBqLJVmAq
nVtwQt5ECYC8AsCwr6BCTkJ4CWk4c2m3FDx2u8LBoiuAdVFamFz7Bt7JaPPs9s27
4hyDUYECgYEA5FNKKMQcf8h5HQIZHJveag/STp5tmmL04hiZ05ZFIWijXcN4QTxw
u5I9/7Knak6PTQHJL1e4eggWz8ETT0IW08eYYUQQ1CEyru7XbB0OKEyPNEtMgART
gSO8Q3vjceKGRVAFDlGH4dt3O+f5IQz8MYA72M5l5hv4hWxw96E5UrECgYEAwAcj
bQFRarh4o//LkVVLSl4IlscEIkh1oac3I5gLayYK/nLG+65gtEuAMtwdra9KMHZW
5gfFbIHGxH30mheZowC+aR9K6Vdp/f7/Guk4KTJzXsMgUtzR+2Y6dXlfe0GCqqoR
nzaWnHe+lYt9oxMZ1QN+McsYLySaWTU3glvZF/8CgYAi78utKTTjKJ2/no6RHhiO
ShV4Ci3jLbkiz3jaM2gokIZO1pYUBVeKm/n4ojGTxqmOsvNB1z5XDd3PtE9sFUTA
6w2Z9HxOuTW0Jr+3v0pnSC+xZMQz4nWUkQ9BlDddObgp6vCbHEaafKZl+Dzanc4J
FQITTqGw8B6667jtazIGQQKBgGAM8gZbK2tTPFzj3OIkJNXc9TTd9U5kqhoituzh
54w/6i3eIXPQhGSKg2RtP5cZ3+UfvFWxO2oL++1bB1dwSJQFEjkowuK2q7i1rMq8
LzBEIPscZPWtqIa0WrdZ742Kdh6BlPDrcChxqO3KaRyBuGEZLy0e5kjmaSIIAWz+
HjfnAoGAKuvFJKBV9jIoDJGP/hRgBdKWaZdGhvSFVMgOPt054mozs97OXW5lyH0d
HH612GWksELxQAJ0yZjCWXcEAHSRk9oqg8X5YKY9WWZDjUpRq6FVH+wFc44Eogqh
YNJhGzaPYRhSepQXyrt/wwOQuJWYjlLzz9zFcNzu2LcB10KcYhM=
-----END RSA PRIVATE KEY-----
20 changes: 20 additions & 0 deletions test/plugin_helper/data/cert/with_ca/ca-cert-pass.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDOzCCAiOgAwIBAgILANKwmEMr6Kq7374wDQYJKoZIhvcNAQELBQAwUzELMAkG
A1UEBhMCVVMxCzAJBgNVBAgMAkNBM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ions & 0 deletions test/plugin_helper/data/cert/with_ca/ca-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDOzCCAiOgAwIBAgILAKIMaSBKt5Lq0kYwDQYJKoZIhvcNAQELBQAwUzELMAkG
A1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MR8w
HQYDVQQDDBZjYS50ZXN0aW5nLmZsdWVudGQub3JnMB4XDTcwMDEwMTAwMDAwMFoX
DTIwMDIyMTA3MTMyOFowUzELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRYwFAYD
VQQHDA1Nb3VudGFpbiBWaWV3MR8wHQYDVQQDDBZjYS50ZXN0aW5nLmZsdWVudGQu
b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq0TVfjX505ziwYo9
P4AvoJ3mipH/EczuXsan5optw/evmJFKaNw7ZdjZpTl2TA5zWzhHVO87u3eDbA/p
LcyGkr9MgiP0R0MzV+H5M2+dqa4sNNDGKbbEP8sM4zONvn2YOr+nZWG4Z62PF2ZS
Da/bUUuNFq077IbIJH9P0Ad3camC1IOJWVKi/nJEmrWhO1VUfalcJwV/PZP3uU73
UkZ/57A10arsn3UQauR1Lbo9ml4D3BcyIuTGmvzdMd57LHETlqtfLPmhBK+wwMzv
aaJfve605vTwyVQDd/tOuoHkblwm/qwkp+qfqpLirQHOC7AhsBDMmpQTWBhE5tUD
wZBFTwIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQB7
0p/K0NwkDLTQSX55G+5m4Tjjgw55jQaSTZ9I5lVrIppOeIB337AlAejGMU+37Qxu
tY07B8j8d7ymGjM23JCIlNXjEcWlIY8w1eDPN5i6KFawXBQbqvWiAsJjbNcy045B
HglWhayG5yvlA9Fxhxf87Riog4sKGJvJdSw7E87fW0dx+Hi7ZyzXwI/XlXcDLd1Z
3Z/cM6jEz8w5UwN3DQzD74TS4nK/oFrcZk+syKDEXDeArMqE9sy0eOZ17c+aS27B
t0yUKiAEBfY5R5Goqo3p6kZ8qhRIqyB8op4f24GoQeZ5CvqwqlPOsaI6FLIn0rfJ
cie9jnR4W5AgF22tJOPP
-----END CERTIFICATE-----
30 changes: 30 additions & 0 deletions test/plugin_helper/data/cert/with_ca/cert-key-pass.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,F34CEE87EF3B4EB12D41896B88BCC81A

541xls0z/Nw8uf+rv7SPgLj9PgCuY4fbjO0QEsQzdtjxXco9rrM9rMm9O1wCHoc0
LWeZYTK0YzrAwHo9mVuJZ3bhRQUVr2j8k7z0G21rxaoaLuonEugeQIC1pwJgj3at
kSF32dSLExv4XLdZbZziLverPQ9eaME83cq76M2W7ahjq4hMENYjfiUyhLyLGQ+2
6J1wxzcjhmp6M1PImrV5hN9e8HPp5gcljalmRRjYycI7UE22ZDiK4yJ2Qdy1Agil
44kgzie+BZvyTIquQxBdPyFhEQRA1TQ4RNEDB+ZIdVAQkQKbvdZVURSYGYIw42cX
Ufv2klZY9r9MBUJ/Bp8U1dgPlbi4GsKNFo1aL5H3KX0FxEvdAoQQe7sEVGSDpFtN
ns7KWvllfO5OABSgST+UhtW5IuMecx6x6JNosX3FlOwz58i+6eSEyr/uPNr3pNFu
BglIgBxQpLrK9dSxf87LRloOc8/1Z5yFzTz4H0r2RWYgI4JGYIrU7vanyxcgcJtH
lWEYMW9o9vqG7DoeetUrCxVXXwgCG+61XV3lVdkWaVpC0FdLGHEyc9vZtvkKigOu
7YfwcY5R7Qt0J4Rjclc6DjsZrKT1JEs7Fu2YG/tpLYvIy78U5p7r/nbq/n4OSZof
5WjGK8zaXlc+rcxrel2JHHmdxkOHmuyOLJwNi4WnpXz+hoJbuujb1iu00/eh6muy
nbhLfWePCu4RyzbXWZLnjMUbAZUKgwIGoij+jMhtGYEIutFSX+ubBVn0NwA1ibvZ
11V62kIWxfXVLRWyXxxYHfMKlcraPynQBmORe/wnS8bTcnCHNmahjcDyxkA+C8Em
zK1vfze0vRxrbOGbT0HcFFcKm9SfhAGeqdbuBshayqk45CRBGceEhjbiYx0N6Vz9
KfratcoRnGO6RtI0A9aasILvTSH+mgDRhU1ahk+54zxXCdHatGtrofE17kd7zB48
9n4XCQgivDCNjU+/ac9IS9B64wQYk7nL+EUylMLOd0psKoNrRVotjWyEOJQS6/uv
df4sC1IzPVG/TsRO1Qc+y5O3YjjsthH4bQem1jzaTuVXKZB8lenrYe3FXVtdLJ1M
f2mzE6DiAe0UMa43GaQzLCNd9dxzWrlElUkX1MiJNHHQW5ejPZuUilLbg5ChYDFF
zJYj2b91Tp7CAYvvzJ2B7IA31jxSkjpLfpR/Ry0v/Mq7ySHN2BaSCA7GUf1dYtvO
6maEhB8ys6uZTUES8NuB+EoOLRb23yPRnLfAq/E2ov736ArRJUmJhmPjSKKdsjvN
MJmsX4NY3vXkP9iSKOiJn6GdTkgJksgqa6XrxzM5MEjlpBIwR4S623jXEQeeAZSL
jn2xLJrW7gjrZthjhjjxEeFKoVxnO9F6MxOf7WkToVYkn4sW7PTNA4yngpjgtSWg
6XpYoW25qMxtdKRd/zGijQxsm6ca0XadhKFG2Nf/po8zgs2wmsnom4ownl+WKdkW
GmYkRBBn5rZ87azQ3HKkvkpzuQ6z+R1i5kn2QGvYwAwjGnPovM0IMkbEj4slXrG6
zDfHapR8PPLx0dCzet918vIZtBHMl9obEnxnwlcgVYlqXzYDaeWlK161YnIRW5Gd
-----END RSA PRIVATE KEY-----
27 changes: 27 additions & 0 deletions test/plugin_helper/data/cert/with_ca/cert-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAm/8eZzoWZIUzOFSLoWoy6oMtjli/wfTt0D24ene5HNAg4haO
IEbILGsw3Uab+L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xWJb1lst7+pvvUhzey
t3l2Jd/r7ZlQsJkfnHS+Da5247Zh72O0cGA9UX2/egw4ah2zYGnDK94mCqj33Ose
eBQavZJEs7hpo2mOqnQABK8CgYAseDF1Ky5ZqgukKgYf0Y1fIcSh6lMAsh0swTi9
URhzYfHsVaiWNa2VRhqQKHXjNm1eQGPjCp9RI4S19rnwdQqB/fjDFf1F5kLrZpCR
ISjntF/yJvhUZjnK9cM9cmKWIjsGnIE9/Zw6vUwDYDlVHst5iK+D/80ipQhN4JEu
7yEQeQKBgBtiAgItkCRrHj0oPPqzGOIFJCnq9VL+xPclzntfNjIQu+hvTVwk/fDX
vw03uikd6M++8DAY/QXN8JjGH8+JgOjHuJnEEE5E2dYtl2rWJIXQEVDIiPK6j8LN
bFB/Nd504eGsAcD4p+ufNp5Kp5RaUjav1VMmr99ZDJzx8N5dZzi/
-----END RSA PRIVATE KEY-----
21 changes: 21 additions & 0 deletions test/plugin_helper/data/cert/with_ca/cert-pass.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDcDCCAligAwIBAgIKITVRNCTUgOhrbDANBgkqhkiG9w0BAQsFADBTMQswCQYD
VQQGEwJVUzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxHzAd
BgNVBAMMFmNhLnRlc3RpbmcuZmx1ZW50ZC5vcmcwHhcNNzAwMTAxMDAwMDAwWhcN
MjAwMjIxMDcxMzI5WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExFjAUBgNV
BAcMDU1vdW50YWluIFZpZXcxIzAhBgNVBAMMGnNlcnZlci50ZXN0aW5nLmZsdWVu
dGQub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwBBE1ryHwGHU
feCS/8kPOwIuiP6nXJnKwMXqllOuMLWf5IzZwXT4BH1NtavXO3vedPoMLDcCn5MT
PQFXcd3MdyZbxyHzbH22HKIgMgZwuYJz65QFD0cPTGf0seTLI2lOUneRaCorffB5
MzlgTgxpMulayRqPhBOcQQ6x67R93SHi4LiQWRV3BixEBIu0YIEvUO3BSaPIlYJU
mSmYUe1ah6K9t2jVqLIKGlQyvA/fwEa8tOlYWtFv7OheFBTqWjW5gLj/wcSDtUQB
BIQT8re6SVyOmyVFmASIpfqQXCF7+IkjJA7tjGmuewJBv17WMK3slZa5PFb130/v
jLJ45bIZFwIDAQABo0IwQDAJBgNVHRMEAjAAMBEGCWCGSAGG+EIBAQQEAwIGQDAL
BgNVHQ8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQAD
ggEBAD2cKdiKz0eTj7z+LZiXY9/EBBXYJQrMDb7S43RFzVtBNVUCbVtP8Q8eKXHV
5De6qOHwIHQqh9wE03G6lZxmJGtZHIGIBbN6VdK5PV2H+rOcQ4/4dym5TGMf3J1C
1D/uaP1VWKxCR099r1WyJNKEqXqE2LWxtVhb1SvqyzW/DprgZaDG218jiqFOdian
j45WH3wilGgbNJzh+d00ZEeU21kGqcqrwpVhsC86vh2YdjQaY00wQEUkm0K84trF
OGllMDX2m0pSOQhdrNkHgHHcLvVOpPQZQOnfJ+bpqwWSYl9YOZdGDXGBXMkxguh5
vieQv/dHPrFifJyfS6ZpMT3uR2M=
-----END CERTIFICATE-----
21 changes: 21 additions & 0 deletions test/plugin_helper/data/cert/with_ca/cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDcDCCAligAwIBAgIKGyBGDBfrjFt5WDANBgkqhkiG9w0BAQsFADBTMQswCQYD
VQQGEwJVUzELMAkGA1UECAwCQ0ExFjAUBgNVBAcMDU1vdW50YWluIFZpZXcxHzAd
BgNVBAMMFmNhLnRlc3RpbmcuZmx1ZW50ZC5vcmcwHhcNNzAwMTAxMDAwMDAwWhcN
MjAwMjIxMDcxMzI4WjBXMQswCQYDVQQGEwJVUzELMAkGA1UECAwCQ0ExFjAUBgNV
BAcMDU1vdW50YWluIFZpZXcxIzAhBgNVBAMMGnNlcnZlci50ZXN0aW5nLmZsdWVu
dGQub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm/8eZzoWZIUz
OFSLoWoy6oMtjli/wfTt0D24ene5HNAg4haOIEbILGsw3Uab+LyXEpjwtdpLH1Rk
5Goj+FeI477k7M6sVn0XsyamSxDakbjFahQIE5VyvsloZs0UQqJy2Mzv0E59Rr+V
5ZMGro104bqVekXwbVR/gFPAGb8dk5v9xunZvK/7jtpWQ5xk3pw6Rq3M7q6XtaZc
cKcKBAID2DvOEv+Hm9FcOhbs7aTEvcpEDFtodAkqn/5e4jFsVOqjHzrPvRwE3Qdm
5yXhNCFoFZC215vs2sIl5pE157bJyGrFIODlO4Bx082fEEeRLZV/f3qOvPACBzBx
HmdlA8jfHQIDAQABo0IwQDAJBgNVHRMEAjAAMBEGCWCGSAGG+EIBAQQEAwIGQDAL
BgNVHQ8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQAD
ggEBAHK2gxBHMkkD2vSQGriXskVcFSUYZ93YnNRLVODKtAVt0DKfIJMW4vveLo+s
NW5M0qxTwIG7K2W6Iu5PZtaBqWmDlHqI7FHg316K24OmQY0vxENhZasDLzj/fSPv
sFBJfGitBItIni5aSnrDj9IqK+gV6z2c5+oaxuqUILccZgR6lXM2IldmOhlhBvhD
dL4pBABjsPZtUtnzCMfvZuJ8ouvduFE3F/oswwq+NakLCk3Sdv/0CWESxHFjiwO0
6q2GuxNwhslxdy+6+gp6bSqBgIwQnhU4Xe6HrPMFc/5TLaHuIX0Sq5UrhaGSXYaA
woGilBZPBk0cDrn6p3eMPtyZ0Pw=
-----END CERTIFICATE-----
30 changes: 30 additions & 0 deletions test/plugin_helper/data/cert/without_ca/cert-key-pass.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN RSA PRIVATE KEY-----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dDKiSt++AtleyKYY+yAQOlX85Uexh0
NvXF2dxBWU7BUVaOP8cVWv7az0FtQ3IxVPHWIw3ggal7bmtxnYkID3xLBGrlD0Z9
SSjRrQBCMknAAxasfes+b1QYQh4vrbBuQv+X+b/ryLP4BEWKc6xbWhlfpdVBndrX
Gx+M+76/+bQGLaiJbvsx8jJGFZTHy+UySKUVf3i7XKpyB7NVZuXsuA3vMK0SsdBl
M+HA6vOcl62IbLZf3U/kaEzX6FzkniWgowI1KZ+RO3seCxB9xCyD78IKKaO6M9vX
Ib8PtnJzBf+m+FqqH260IR3ZkQjjhLQKRH/WFh1TrZ6onRVcPVM7lC0QtXyJX4pJ
NfBY2ZahFdCQgmF4bijPvL2XePbd6/AXxa+lCGslZKO+GYfMBCu5x/mXjKCb5RCC
7oUgyxkqu6FoCoVMInv2JARV1kRqW8bgStbSKh8ImsAZHFW3XphhVeYA22M1pEVG
bKC/jK2WFqqPt5sM6XzHCLDZqPVOLFisfovaKRHpOFWDUDIdKqWjCadO4rAYNj7G
Z8E/ZH4o9NAZScsj7Adi4ObDBUF09kLqtkGfcfMh5r4d98gMK4pM/J2lmP85SwR0
-----END RSA PRIVATE KEY-----
27 changes: 27 additions & 0 deletions test/plugin_helper/data/cert/without_ca/cert-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA2gEIlFT3uCxaeN/P51Pn0xCGqqSvbQ/YBf4ITugnvKWawebl
x+8Qk+1BjtvWD7c6DX6Li/Z8DDlmbr2y1djEOH4dswuxrzOccmL5ZJkl6n42pz0z
ab13FzFEHG3HmQWthGxxZYHsPL1H+eyKfIS9q2yOne2DwV0NDV+kLA+ORIO7xsrp
TvhOmjVr5AHUEzLOtic/HjenpndTbg6eZEuQyi8MfHLl5nURGawA3+++zXx244vr
oQZNBCriCCDJcbzwibMm8mGnyhkKLF0Fll+qypQpzJi1Jxu2V5Akfo9V2K3ap1ed
6qRb+iC69ok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