From d96bb413ca0238172797b43cb0991394dbd85d35 Mon Sep 17 00:00:00 2001 From: micdzied Date: Mon, 22 Oct 2018 15:08:50 +0200 Subject: add vsftpd with ca and keys Change-Id: I29f1d5e67f01d21eed88d20ae447de9bc59e0bdb Issue-ID: INT-695 Signed-off-by: micdzied --- .../pnfsimulator/ftpes/pure-ftpd/tls/pure-ftpd.pem | 49 ++++++++++++++++++ .../ftpes/pure-ftpd/userpass/pureftpd.passwd | 1 + test/mocks/pnfsimulator/ftpes/tls/pure-ftpd.pem | 49 ------------------ .../pnfsimulator/ftpes/userpass/pureftpd.passwd | 1 - .../ftpes/vsftpd/configuration/vsftpd_ssl.conf | 55 +++++++++++++++++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.crt | 20 ++++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.csr | 18 +++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.jks | Bin 0 -> 2529 bytes test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.key | 27 ++++++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.p12 | Bin 0 -> 2492 bytes test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.crt | 20 ++++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.csr | 18 +++++++ test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.der | Bin 0 -> 848 bytes test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.jks | Bin 0 -> 3209 bytes test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.key | 27 ++++++++++ .../ftpes/vsftpd/tls/vsftpd_keys_generator.sh | 27 ++++++++++ 16 files changed, 262 insertions(+), 50 deletions(-) create mode 100755 test/mocks/pnfsimulator/ftpes/pure-ftpd/tls/pure-ftpd.pem create mode 100755 test/mocks/pnfsimulator/ftpes/pure-ftpd/userpass/pureftpd.passwd delete mode 100755 test/mocks/pnfsimulator/ftpes/tls/pure-ftpd.pem delete mode 100755 test/mocks/pnfsimulator/ftpes/userpass/pureftpd.passwd create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/configuration/vsftpd_ssl.conf create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.crt create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.csr create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.jks create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.key create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.p12 create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.crt create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.csr create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.der create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.jks create mode 100644 test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.key create mode 100755 test/mocks/pnfsimulator/ftpes/vsftpd/tls/vsftpd_keys_generator.sh (limited to 'test/mocks/pnfsimulator/ftpes') diff --git a/test/mocks/pnfsimulator/ftpes/pure-ftpd/tls/pure-ftpd.pem b/test/mocks/pnfsimulator/ftpes/pure-ftpd/tls/pure-ftpd.pem new file mode 100755 index 000000000..0ce676efa --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/pure-ftpd/tls/pure-ftpd.pem @@ -0,0 +1,49 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHbSk5/cABTpCt +q54QyTkhuhb84nEz5ztKL0hY56fsVtAA2gSAde+qV9YwUIuReOUhAF4RVVt2Lkn/ +1R0yX+0IjrXnO7jYzDj6QhgyqYKb3iQlvShZMMQ7qihn8qBxobk7+O10x6VLS2L8 +WYpQxGXu7T1qXbw10RhrqG8nbXYX+aHMsv9zMt9OYqKSI073OZR2vk3K49Uqcurj +sXuRJOa10MRsxgA726pr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FoAUt51lQ+abMTq+w2U/knCsIPb3wrkw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAQ69AktYLQ+VRbojz +zC0XQ2M1FAkfJI2P0LvPoYxZgId2CnZW3sMIdnJdF+KjvOqeGyFmw+hn8WkoKiWj +0sxuGmrWt5t+5bF2wcq0CtTeF1/o6DsRhRiJBzmcLe81ItrN6emZSg96xCKzkHBZ +3nF4fG88vtiYgD932lMStDqQzSTx0FsCGpGaKh9xDmKvlP24NWdM9gyOEsRbDvqd +vS1Q45Jx0jzkp7X5d0casqBWIZak3z0EVdK7c8Y/GxxTcWfIMINCl9+F9kpTA/ZX +uARYzrPWaBfDBi2r5acWi/AHJM3U+LgzO5nCKa+38vtjNw3NtbslA4InQ5cU2B8X +QN8NlQ== +-----END CERTIFICATE----- diff --git a/test/mocks/pnfsimulator/ftpes/pure-ftpd/userpass/pureftpd.passwd b/test/mocks/pnfsimulator/ftpes/pure-ftpd/userpass/pureftpd.passwd new file mode 100755 index 000000000..7961e710d --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/pure-ftpd/userpass/pureftpd.passwd @@ -0,0 +1 @@ +onap:$6$Guq6OMhBdNZ6nTk0$7dLt6hOrAv.in36jzWGd5UgWeDqN3CuKjrzJ.izRTdgZRTszeNYbT2dk7UDh9CLD7pohnB0.k1NSZmRIUB/ID/:1001:1001::/home/ftpusers/onap/./:::::::::::: diff --git a/test/mocks/pnfsimulator/ftpes/tls/pure-ftpd.pem b/test/mocks/pnfsimulator/ftpes/tls/pure-ftpd.pem deleted file mode 100755 index 0ce676efa..000000000 --- a/test/mocks/pnfsimulator/ftpes/tls/pure-ftpd.pem +++ /dev/null @@ -1,49 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDHbSk5/cABTpCt -q54QyTkhuhb84nEz5ztKL0hY56fsVtAA2gSAde+qV9YwUIuReOUhAF4RVVt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ID3ND+p+4MaNCVFOXT56z27L33XoCBcX3Oe6GV6y8+52F5CRHI2EwRUkP -iQGkX8fZDV2exn7exADMhQS3pmP9FQIDAQABo1MwUTAdBgNVHQ4EFgQUt51lQ+ab -MTq+w2U/knCsIPb3wrkwHwYDVR0jBBgwFoAUt51lQ+abMTq+w2U/knCsIPb3wrkw -DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAQ69AktYLQ+VRbojz -zC0XQ2M1FAkfJI2P0LvPoYxZgId2CnZW3sMIdnJdF+KjvOqeGyFmw+hn8WkoKiWj -0sxuGmrWt5t+5bF2wcq0CtTeF1/o6DsRhRiJBzmcLe81ItrN6emZSg96xCKzkHBZ -3nF4fG88vtiYgD932lMStDqQzSTx0FsCGpGaKh9xDmKvlP24NWdM9gyOEsRbDvqd -vS1Q45Jx0jzkp7X5d0casqBWIZak3z0EVdK7c8Y/GxxTcWfIMINCl9+F9kpTA/ZX -uARYzrPWaBfDBi2r5acWi/AHJM3U+LgzO5nCKa+38vtjNw3NtbslA4InQ5cU2B8X -QN8NlQ== ------END CERTIFICATE----- diff --git a/test/mocks/pnfsimulator/ftpes/userpass/pureftpd.passwd b/test/mocks/pnfsimulator/ftpes/userpass/pureftpd.passwd deleted file mode 100755 index 7961e710d..000000000 --- a/test/mocks/pnfsimulator/ftpes/userpass/pureftpd.passwd +++ /dev/null @@ -1 +0,0 @@ -onap:$6$Guq6OMhBdNZ6nTk0$7dLt6hOrAv.in36jzWGd5UgWeDqN3CuKjrzJ.izRTdgZRTszeNYbT2dk7UDh9CLD7pohnB0.k1NSZmRIUB/ID/:1001:1001::/home/ftpusers/onap/./:::::::::::: diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/configuration/vsftpd_ssl.conf b/test/mocks/pnfsimulator/ftpes/vsftpd/configuration/vsftpd_ssl.conf new file mode 100644 index 000000000..6d94ad827 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/configuration/vsftpd_ssl.conf @@ -0,0 +1,55 @@ +# Server Config +anonymous_enable=NO +local_enable=YES +write_enable=YES +local_umask=022 +dirmessage_enable=YES + +# Security and User auth +chroot_local_user=YES +pam_service_name=vsftpd_virtual +virtual_use_local_privs=YES +chmod_enable=NO +user_config_dir=/etc/vsftpd/user_conf +user_sub_token=$USER +#local_root=/srv/$USER +local_root=/srv/ +userlist_enable=NO +allow_writeable_chroot=YES + +# Logging +log_ftp_protocol=YES +xferlog_enable=YES +xferlog_std_format=YES +#xferlog_file=/dev/stdout +syslog_enable=NO +dual_log_enable=YES + +# Remap all login users to this username +guest_enable=YES +guest_username=ftp +hide_ids=YES + +# Networking +connect_from_port_20=NO +listen=YES +tcp_wrappers=YES +pasv_min_port=8001 +pasv_max_port=8010 + +# SSL +ssl_enable=Yes +rsa_cert_file=/etc/ssl/private/vsftpd.crt +rsa_private_key_file=/etc/ssl/private/vsftpd.key +require_ssl_reuse=NO +force_local_data_ssl=YES +force_local_logins_ssl=YES +ssl_ciphers=HIGH +allow_anon_ssl=NO + +ssl_tlsv1=YES +ssl_sslv2=YES + +require_cert=YES +ssl_request_cert=YES +ca_certs_file=/home/vsftpd/onap/client.crt diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.crt b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.crt new file mode 100644 index 000000000..9053acf6b --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDTDCCAjQCCQC35XXwaJRpezANBgkqhkiG9w0BAQsFADBoMQswCQYDVQQGEwJQ +TDENMAsGA1UECAwEYWRhczEMMAoGA1UEBwwDYXNkMQwwCgYDVQQKDANhc2QxDDAK +BgNVBAsMA2FzZDEMMAoGA1UEAwwDYXNkMRIwEAYJKoZIhvcNAQkBFgNhc2QwHhcN +MTgxMDE5MTE1ODI3WhcNMTkxMDE5MTE1ODI3WjBoMQswCQYDVQQGEwJQTDENMAsG +A1UECAwEYWRhczEMMAoGA1UEBwwDYXNkMQwwCgYDVQQKDANhc2QxDDAKBgNVBAsM +A2FzZDEMMAoGA1UEAwwDYXNkMRIwEAYJKoZIhvcNAQkBFgNhc2QwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC81m2sWiO2tcv8huzFJWMovh6fsk2TZzli +w0598BXUIaSmKeFe/i51FvON8QjYoTckjeuARxiQPHvD4cB68SXTQv0AqxId1DsA +GZy8JE0FO29Cux7a0SEMdJUjkRxAcGrz2NOtbFxmaZDvtQVRoNbaaKIe9VKYbvfF +jdIx/8qQiSHUahm9fdrJqH+HQaTIQPGBMWTF8WC3ptRxtyQ49nFjnhL19glviT1S +0NpHTuX4h46dZX/X9bHdoPZF84Nl2yyFS+PK2lEzmQQE/uBXFxmKanEbxcF2ORo7 +LmebHfXL3Rc2jE7akhod5Vvg+nrSUc+JTcWeRxsA29C/OQoLh/l9AgMBAAEwDQYJ +KoZIhvcNAQELBQADggEBADZw1bosIxPAjTPWPKO3h2BynrZqYQFbq3QttdCLoUIj +YxUM/sR6fXju0WSSJrdvdN6nPzQ1dl+6mtppCVhavy6vZGzBN1IO1hWM2Z9yO2sa +r4e2cw2S0rjm/+WXKOn2v8wIUmhFGCBpsXWGmVx+WjaE4BmPkb+qfN5G72H8eaap +qD9RAMHoxM4+sXCSz2CDdiyUa7U0Oy85L/dMzua3VZjtQDwC7D9RpS5+qKhaTTUs +wG9DbruD95tkjlXt1lvpxoFlCTvdXOGkviwG27K6XAfnoHRt1CU5Z0U+IGNTt9fj +fKnQTEfeK4uYtOaeNNs84KNl9J6fcUNIOwHxwb3RLmw= +-----END CERTIFICATE----- diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.csr b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.csr new file mode 100644 index 000000000..c4c098b28 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.csr @@ -0,0 +1,18 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ftpes/vsftpd/tls/dfc.jks b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.jks new file mode 100644 index 000000000..717874690 Binary files /dev/null and b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.jks differ diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.key b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.key new file mode 100644 index 000000000..cca071a53 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAvNZtrFojtrXL/IbsxSVjKL4en7JNk2c5YsNOffAV1CGkpinh +Xv4udRbzjfEI2KE3JI3rgEcYkDx7w+HAevEl00L9AKsSHdQ7ABmcvCRNBTtvQrse +2tEhDHSVI5EcQHBq89jTrWxcZmmQ77UFUaDW2miiHvVSmG73xY3SMf/KkIkh1GoZ +vX3ayah/h0GkyEDxgTFkxfFgt6bUcbckOPZxY54S9fYJb4k9UtDaR07l+IeOnWV/ +1/Wx3aD2RfODZdsshUvjytpRM5kEBP7gVxcZimpxG8XBdjkaOy5nmx31y90XNoxO +2pIaHeVb4Pp60lHPiU3FnkcbANvQvzkKC4f5fQIDAQABAoIBAC0/1JfwIY6ukWq5 +ihLTmqcwp3Xs69neaknYMv7KgPCL/0Ax2OdCUS+NiF8C2vPN7cC8oSnj32bwl1eg +yNas4jt1WdrHI1gyetDTUlNi/3G5hDehTwtwAVNSvEoBg5uNVJOJ6W8tABcqRKir +39JnkBRV7kMs1dXhAU49ZZjFimyHhbdWeme8zcqC4lqk5ZYcXgCiOSYUNjeV39XC +aE/NlXS1d8dqnL/nXV3otvFMe7Ax/J+frlpALJGRCNlMNVT67c3pv+1FkXGPW/8q +WvrTPsWPL5lqykD+isgiLMW5GXQzyw07Ohf+7BBZmn0bKWEkEVC590IZ2KQgN19Q +jU80QaECgYEA9D3Kp3axg9IgvswpUOFjeCt0eviSRGlKNG0FEFT/mC00m88YUDw+ +iMi5nAPfnEiYi6Ql6ncvaohhMiHwlQQk51AKgsotSCJCwewO4UiAibqu47RoBXtR +R/3cPOqnE0YziTeIgbRxEoKU1iycXkdugxX8yToYc/vFSIeKEr/nD2cCgYEAxe3M +7pbBCLsCACbT/N4Ye9yUt5akKMOJPFLoGZe1COf8f2sp0QZc4IhtPIkE65VeC2yX +5+XRxjI1CHBZzu7QcBmdfEZbawWWM0Ehpgf3TUmzpLzgvTj4D697TBOc2S0oMo9o +4dT+7QOuw6vt2dTfm2cBCw/JibXIfQJ58W5K9XsCgYBCKkMuHq90QIZyaah/qq9h +rJP/hDtLoSJjFW2bwQsE1Ko901qI0ek28PmnVD1NfzUkDzHeVK9Zstxx0lP0aoz8 +xOg0CkU+F1nyYtqdGSEJLrOWKBdN9NxOHm19aywbwpbPg2XNjW5cT1e2tZsex0ce +5+P1N3HMadZGEcHL1oTn3QKBgBnLdQK/GOcnYApfBQ+WbkBuLd+DPV+mpBL9hwwW +zlwbx7dfYvK/zojgnsPd44tESx5YB7AMLnuS/YBdDAdA7l89p12T2cQn1TxWx6jY +ru0eps/YYb2nWATLTNlMUQuoq+1y7StJU/PVoAgWNwhFiuK42NT1OMG+tCM+mF/T +jOdTAoGBAOkVlTCF3OKHhNWrzX5dQGHicCczaciaAJtXbYg10HDSzzIMf4ypzzv7 +QfbTB9rF5mZBjtr2s2/DZw9PQGd434ZFJ3z8wD2HvtH26HhxVmqJKo1mqsR6FArW +GBPVq0LeUzfgQQahaeTkDC+nFvlq63AhUx+cAdNbb8VLEfih7Sns +-----END RSA PRIVATE KEY----- diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.p12 b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.p12 new file mode 100644 index 000000000..2e9357ea3 Binary files /dev/null and b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/dfc.p12 differ diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.crt b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.crt new file mode 100644 index 000000000..497ad8703 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDTDCCAjQCCQDQEPBXT/e7YDANBgkqhkiG9w0BAQsFADBoMQswCQYDVQQGEwJQ +TDEMMAoGA1UECAwDYXNkMQ0wCwYDVQQHDARhc2RhMQwwCgYDVQQKDANhc2QxDDAK +BgNVBAsMA2FzZDEMMAoGA1UEAwwDYXNkMRIwEAYJKoZIhvcNAQkBFgNhc2QwHhcN +MTgxMDE5MTE1ODU5WhcNMTkxMDE5MTE1ODU5WjBoMQswCQYDVQQGEwJQTDEMMAoG +A1UECAwDYXNkMQ0wCwYDVQQHDARhc2RhMQwwCgYDVQQKDANhc2QxDDAKBgNVBAsM +A2FzZDEMMAoGA1UEAwwDYXNkMRIwEAYJKoZIhvcNAQkBFgNhc2QwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDupZ7LgYA/qvwd0Spghdmz5oLPpZkIc0nI +KRq80AQOtxH6bTRFRxU8xPvN5Jg2EOzjenLw6qhg1ybGZ5G7bSWW8WeEyuF+RlM1 +xBHiOsWRDzy2vvchnG7T+lcK/j7KtquJdd0qkiaZOfGW9+Yii/QwBGN/IkgjgsV6 +fTIsmlZYWxWtSjEYjnrF6YFmY63GuZkpJwcYkrlEbGsuZO6Q68Eew5A/e9JY7sdK +qs8xU/yoNEaRAmqsffHmDbkLPtVbdjTtB93eT1j1zq1yEbMQKQxZWr2iUbLTFyXr +FAlxPh8BD1OBuZIs0t92vn1agcdMPiyias+f8H2wBjgYeOz3DQgjAgMBAAEwDQYJ +KoZIhvcNAQELBQADggEBAO2hBd0vYkWuAdE8dzqJXctMJL4ij26shSje1V2EfzEC +i+m7azo+hPVc5T+lno9s6JgC9jrKRlaTTgY+pN8y05FP8sufU4Vw7yTnsJWVxgsd +T0rh30Gl2Nl7lce3hD4zjWxysYBgJ+HnY8YpHI3KpkhxuwsPW51wwtNEVMlfXd6i +myIdbw1nzJ4ZuY3IUjKwjcmspD3ewVnRJKLj0zeN/y13obr/Mu6NCdUo2qCsTTQS +Ws2135DuPWDRMqJy8JuxTXmq6vdfhqQwE1jyxa3ovG+dn57jDpLTe5jOobKavB12 +IEOh2ea+LrVVBGs5XiCO7ZzZjJyn+R2AFw1ay3nM8RI= +-----END CERTIFICATE----- diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.csr b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.csr new file mode 100644 index 000000000..b67e60b4a --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.csr @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIC2DCCAcACAQAwaDELMAkGA1UEBhMCUEwxDDAKBgNVBAgMA2FzZDENMAsGA1UE +BwwEYXNkYTEMMAoGA1UECgwDYXNkMQwwCgYDVQQLDANhc2QxDDAKBgNVBAMMA2Fz +ZDESMBAGCSqGSIb3DQEJARYDYXNkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA7qWey4GAP6r8HdEqYIXZs+aCz6WZCHNJyCkavNAEDrcR+m00RUcVPMT7 +zeSYNhDs43py8OqoYNcmxmeRu20llvFnhMrhfkZTNcQR4jrFkQ88tr73IZxu0/pX +Cv4+yrariXXdKpImmTnxlvfmIov0MARjfyJII4LFen0yLJpWWFsVrUoxGI56xemB +ZmOtxrmZKScHGJK5RGxrLmTukOvBHsOQP3vSWO7HSqrPMVP8qDRGkQJqrH3x5g25 +Cz7VW3Y07Qfd3k9Y9c6tchGzECkMWVq9olGy0xcl6xQJcT4fAQ9TgbmSLNLfdr59 +WoHHTD4somrPn/B9sAY4GHjs9w0IIwIDAQABoCswEgYJKoZIhvcNAQkCMQUMA2Fz +ZDAVBgkqhkiG9w0BCQcxCAwGc2VjcmV0MA0GCSqGSIb3DQEBCwUAA4IBAQCKf1xL +6lY7NdrzfkQGg9fwX2bCMU6d83WR3fCdHOu/ez8owdmVI6zC3F78UIjvSHnO2W/L +vBYwcybSjoLlRTxrU9Dv/WqFfHdGvxON8pCpL243IKWsWpTgMJBPF3D45dOgnDP5 +xKl6g1UelyNqXPLEiwp01B0nrJSvV6LGBNmI8nAL6Uxs+RZL2qq/d3yfGouD4xDX +a8ZXJe8zIrqB7CJnK7dzRWqWTpLyHNkOQm/Ru9YIQc62JRjKct9lxpcfRzJwyzDm +x620sT6Y+Yqdthkhj5sF9hImIhhPWNN7OiFQ2Zu7NmcYHakuXYr3FovObMkMl1eQ +OJUhqylUF2MHGnrK +-----END CERTIFICATE REQUEST----- diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.der b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.der new file mode 100644 index 000000000..4cc628ccb Binary files /dev/null and b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.der differ diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.jks b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.jks new file mode 100644 index 000000000..e0e49057f Binary files /dev/null and b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.jks differ diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.key b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.key new file mode 100644 index 000000000..575d98087 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/ftp.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA7qWey4GAP6r8HdEqYIXZs+aCz6WZCHNJyCkavNAEDrcR+m00 +RUcVPMT7zeSYNhDs43py8OqoYNcmxmeRu20llvFnhMrhfkZTNcQR4jrFkQ88tr73 +IZxu0/pXCv4+yrariXXdKpImmTnxlvfmIov0MARjfyJII4LFen0yLJpWWFsVrUox +GI56xemB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3uaMQ+EXVDFdEzQl2GNRa9 +iKQTFdugJw9OR+Gutr3GO/c43Ezcpkudi3JaWoePfCZyqz8ErKY8NCQcN6TwfHFo +jLWXsKhtRqfiHITZK7B66Kb4yfOnGbuPhtzo14V8VWzkQdYyHVPCLiMtqbI0dlt6 +bfTlAoGBAIfJ87AXnXMWlT9GgPUe6R2Mjln5VgW2X+VAW6P1ALBjpVoyfJg6/xn3 +7SHweBnQ1PopSHGGBIjWvw9KuScaaGg0+1vgcmtJiiZukNJ+YlHYOg1oWcb+EacT +wAGeLZzRf+wKzpMT4cfCKVVxr5pTDXUmieI1VjxIVaZjxX+5RUE2 +-----END RSA PRIVATE KEY----- diff --git a/test/mocks/pnfsimulator/ftpes/vsftpd/tls/vsftpd_keys_generator.sh b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/vsftpd_keys_generator.sh new file mode 100755 index 000000000..e88ff8965 --- /dev/null +++ b/test/mocks/pnfsimulator/ftpes/vsftpd/tls/vsftpd_keys_generator.sh @@ -0,0 +1,27 @@ +!/bin/bash +echo 'Generating credetials for FTPES server and DFC client...' + +echo 'FTPES' +#ganerate certificate&privatekey +openssl req -x509 -days 365 -newkey rsa:2048 -keyout ftp.key -out ftp.crt -subj "/C=PL/ST=Dolny Slask/L=Wroclaw/O=Root Company/OU=IT Department/CN=Nokia" --passout pass:secret +#create a jks keystore for TrustManager +keytool -keystore ftp.jks -genkey -alias ftp -storepass secret -keypass secret -dname "CN=Nokia, OU=IT Department, O=Root Company, L=Wroclaw, ST=Dolny Slask, C=PL" +#convert your certificate in a DER format : +openssl x509 -outform der -in ftp.crt -out ftp.der +#and after, import it in the keystore : +keytool -import -alias ftep -keystore ftp.jks -file ftp.der -storepass secret -keypass secret -dname "CN=Nokia, OU=IT Department, O=Root Company, L=Wroclaw, ST=Dolny Slask, C=PL" + +echo 'DFC client' +#ganerate certificate&privatekey +openssl req -x509 -days 365 -newkey rsa:2048 -keyout dfc.key -out dfc.crt -subj "/C=PL/ST=Dolny Slask/L=Wroclaw/O=Root Company/OU=IT Department/CN=Nokia" +#create a jks keystore for TrustManager +keytool -keystore dfc.jks -genkey -alias dfc -storepass secret -keypass secret -dname "CN=root.com, OU=Root Org, O=Root Company, L=Wroclaw, ST=Dolny Slask, C=PL" +#import client.crt and client.key to p12 +openssl pkcs12 -export -in dfc.crt -inkey dfc.key \ + -out dfc.p12 -name dfc +#keystore +keytool -importkeystore \ + -deststorepass secret -destkeypass secret -destkeystore dfc.jks \ + -srckeystore dfc.p12 -srcstoretype PKCS12 -srcstorepass secret \ + -alias dfc +echo 'Finished' \ No newline at end of file -- cgit 1.2.3-korg