Skip to content
This repository was archived by the owner on Oct 14, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
name: .NET

on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest
env:
LINUX_DISTO: Ubuntu-20.04
FTP_USER: fullgx
FTP_PASS: fullgx
TRUST_STORE_PASS: fullgx

steps:
- uses: Vampire/setup-wsl@v1
with:
distribution: ${{env.LINUX_DISTO}}
additional-packages:
vsftpd

- name: Setup user
shell: wsl-bash {0}
run: |
sudo useradd -m -p $(perl -e 'print crypt($ARGV[0], "password")' '${{env.FTP_PASS}}') ${{env.FTP_USER}}
echo ${{env.FTP_USER}} >> /etc/vsftpd.userlist

- name: Setup SSH
shell: wsl-bash {0}
run: |
sudo apt-get -qq -y purge openssh-server
sudo apt-get -qq -y install openssh-server
echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
sudo service ssh --full-restart

- uses: Vampire/setup-wsl@v1
with:
distribution: ${{env.LINUX_DISTO}}
wsl-shell-command: bash -c "sudo -u ${{env.FTP_USER}} bash --noprofile --norc -euo pipefail '{0}'"

- name: Setup certificates
shell: wsl-bash {0}
run: |
ssh-keygen -b 2048 -t rsa -m pem -f ~/.ssh/id_rsa -q -N ""
ssh-keygen -f ~/.ssh/id_rsa -m pem -e > /tmp/id_rsa.pem

cat ~/.ssh/id_rsa > /tmp/vsftpd1.pem
cat /tmp/id_rsa.pem >> /tmp/vsftpd1.pem

openssl req -new -x509 -key ~/.ssh/id_rsa -days 365 -subj "/CN=GeneXus" -out /tmp/ftp.cer
openssl pkcs12 -export -in /tmp/ftp.cer -inkey ~/.ssh/id_rsa -out /tmp/ftp_cert.pfx -password pass:${{env.TRUST_STORE_PASS}}

ssh-keyscan -H 127.0.0.1 >> /tmp/known_hosts

echo '::set-output name=BASE_64_ID_RSA::$(cat ~/.ssh/id_rsa | base64)'
echo '::set-output name=BASE_64_PFX_CERT::$(cat /tmp/ftp_cert.pfx | base64)'
echo '::set-output name=BASE_64_KNOWN_HOSTS::$(cat /tmp/known_hosts | base64)'

- uses: Vampire/setup-wsl@v1
with:
distribution: ${{env.LINUX_DISTO}}
wsl-shell-command: bash -c "bash --noprofile --norc -euo pipefail '{0}'"

- name: Configure vsftpd
shell: wsl-bash {0}
run: |
mv /tmp/vsftpd1.pem /etc/ssl/private/vsftpd1.pem
mkdir -p /etc/vsftpd/

cat <<EOF > /etc/vsftpd/vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=ftp
pasv_enable=Yes
pasv_min_port=10000
pasv_max_port=11000
user_sub_token=$USER
local_root=/home/$USER/ftp
userlist_enable=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
rsa_cert_file=/etc/ssl/private/vsftpd1.pem
rsa_private_key_file=/etc/ssl/private/vsftpd1.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
require_ssl_reuse=NO
debug_ssl=YES
ssl_ciphers=HIGH
seccomp_sandbox=NO
isolate_network=NO
EOF

sudo /etc/init.d/vsftpd start

- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
42 changes: 10 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vs/
packages/
test/
dotnet/dotnetframework/SecurityAPICommons/bin/
dotnet/dotnetframework/SecurityAPICommons/obj/
dotnet/dotnetframework/GeneXusXmlSignature/obj/
Expand All @@ -26,40 +25,19 @@ dotnet/dotnetcore/GeneXusJWTNetCore/obj/
dotnet/dotnetcore/GeneXusJWTNetCore/bin/
dotnet/dotnetcore/GeneXusCryptographyNetCore/obj/
dotnet/dotnetcore/GeneXusCryptographyNetCore/bin/
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/GeneXusFtpsNetCore.csproj.nuget.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/GeneXusFtpsNetCore.csproj.nuget.dgspec.json
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/GeneXusFtpsNetCore.csproj.nuget.g.props
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/GeneXusFtpsNetCore.csproj.nuget.g.targets
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/project.assets.json
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.AssemblyInfo.cs
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.AssemblyInfoInputs.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.assets.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.csproj.CopyComplete
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.csproj.FileListAbsolute.txt
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCore.csprojAssemblyReference.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Debug/netcoreapp3.1/GeneXusFtpsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.AssemblyInfo.cs
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.AssemblyInfoInputs.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.assets.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.csproj.CopyComplete
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.csproj.FileListAbsolute.txt
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCore.csprojAssemblyReference.cache
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/Release/netcoreapp3.1/GeneXusFtpsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Debug/netcoreapp3.1/GeneXusFtpsNetCoreImpl.deps.json
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Debug/netcoreapp3.1/GeneXusFtpsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Debug/netcoreapp3.1/GeneXusFtpsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Debug/netcoreapp3.1/GeneXusSecurityAPICommonsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Debug/netcoreapp3.1/GeneXusSecurityAPICommonsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Release/netcoreapp3.1/GeneXusFtpsNetCoreImpl.deps.json
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Release/netcoreapp3.1/GeneXusFtpsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Release/netcoreapp3.1/GeneXusFtpsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Release/netcoreapp3.1/GeneXusSecurityAPICommonsNetCoreImpl.dll
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/Release/netcoreapp3.1/GeneXusSecurityAPICommonsNetCoreImpl.pdb
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/
dotnet/dotnetframework/GeneXusFtps/obj/
dotnet/dotnetframework/GeneXusFtps/bin/
dotnet/dotnetframework/GeneXusFtps/packages.config
dotnet/dotnetcore/GeneXusFtpsNetCore/obj/
dotnet/resources/key.snk
dotnet/dotnetcore/GeneXusFtpsNetCore/bin/
/test/dotnetcore/SecurityAPITestNetCore/.runsettings
/test/dotnetframework/SecurityAPITest/.runsettings
/test/dotnetframework/SecurityAPITest/obj/
/test/dotnetframework/SecurityAPITest/bin/
/test/dotnetcore/SecurityAPITestNetCore/bin/
/test/dotnetcore/SecurityAPITestNetCore/obj/
/test/resources/key.snk
/test/.runsettings
29 changes: 14 additions & 15 deletions SecurityAPIParent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,29 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnet", "dotnet", "{5CB172
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnetframework", "dotnetframework", "{5EA71E19-9448-4F49-B24A-A5BF8964C54D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecurityAPICommons", "dotnet\dotnetframework\SecurityAPICommons\SecurityAPICommons.csproj", "{BE9A040C-DE9A-490A-B02C-9E1D97B30B21}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityAPICommons", "dotnet\dotnetframework\SecurityAPICommons\SecurityAPICommons.csproj", "{BE9A040C-DE9A-490A-B02C-9E1D97B30B21}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnetcore", "dotnetcore", "{2B1F2BC4-723C-46F6-8C23-3FB82AF975E9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityAPICommonsNetCore", "dotnet\dotnetcore\SecurityAPICommonsNetCore\SecurityAPICommonsNetCore.csproj", "{A3C5EE4E-A9AA-408F-AE26-9E28154D1C39}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneXusCryptography", "dotnet\dotnetframework\GeneXusCryptography\GeneXusCryptography.csproj", "{420F7E79-1CC3-4FA6-8399-7C07B2EE94DE}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusCryptography", "dotnet\dotnetframework\GeneXusCryptography\GeneXusCryptography.csproj", "{420F7E79-1CC3-4FA6-8399-7C07B2EE94DE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusCryptographyNetCore", "dotnet\dotnetcore\GeneXusCryptographyNetCore\GeneXusCryptographyNetCore.csproj", "{4E759B82-D093-43E4-BF34-923025AED531}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneXusXmlSignature", "dotnet\dotnetframework\GeneXusXmlSignature\GeneXusXmlSignature.csproj", "{291B2556-49D9-4775-823F-FCE5E2416C0A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusXmlSignature", "dotnet\dotnetframework\GeneXusXmlSignature\GeneXusXmlSignature.csproj", "{291B2556-49D9-4775-823F-FCE5E2416C0A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusXmlSignatureNetCore", "dotnet\dotnetcore\GeneXusXmlSignatureNetCore\GeneXusXmlSignatureNetCore.csproj", "{503D8578-4455-4DC0-ADDC-37E4C886427B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneXusJWT", "dotnet\dotnetframework\GeneXusJWT\GeneXusJWT.csproj", "{1D9FF129-BE37-4316-BFF3-9BEACC4612CB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusJWT", "dotnet\dotnetframework\GeneXusJWT\GeneXusJWT.csproj", "{1D9FF129-BE37-4316-BFF3-9BEACC4612CB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusJWTNetCore", "dotnet\dotnetcore\GeneXusJWTNetCore\GeneXusJWTNetCore.csproj", "{09DD9A8C-C6E8-47B2-BF68-D85BF5E6FC36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneXusSftp", "dotnet\dotnetframework\GeneXusSftp\GeneXusSftp.csproj", "{7F864DEC-0EE0-420D-9976-9C7E39398161}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusSftp", "dotnet\dotnetframework\GeneXusSftp\GeneXusSftp.csproj", "{7F864DEC-0EE0-420D-9976-9C7E39398161}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusSftpNetCore", "dotnet\dotnetcore\GeneXusSftpNetCore\GeneXusSftpNetCore.csproj", "{1C8B841E-28A7-4D6B-95BE-47D2DDE1FE35}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneXusFtps", "dotnet\dotnetframework\GeneXusFtps\GeneXusFtps.csproj", "{76AD359D-960B-418D-8A1C-004E0E2D325C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusFtps", "dotnet\dotnetframework\GeneXusFtps\GeneXusFtps.csproj", "{76AD359D-960B-418D-8A1C-004E0E2D325C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneXusFtpsNetCore", "dotnet\dotnetcore\GeneXusFtpsNetCore\GeneXusFtpsNetCore.csproj", "{06054CD3-91A7-4A0A-AA5C-A70B64CF4755}"
EndProject
Expand All @@ -39,16 +39,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnetcore", "dotnetcore",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dotnetframework", "dotnetframework", "{7F5F1DDC-09BE-4567-8CD4-41387AD91BEE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SecurityAPITest", "test\dotnetframework\SecurityAPITest\SecurityAPITest.csproj", "{9100025A-68E0-4618-B83C-4D626CB89DBB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityAPITestNetCore", "test\dotnetcore\SecurityAPITestNetCore\SecurityAPITestNetCore.csproj", "{44B8B2B6-0842-4018-A547-EF33920EFC8E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityAPITest", "test\dotnetframework\SecurityAPITest\SecurityAPITest.csproj", "{9100025A-68E0-4618-B83C-4D626CB89DBB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "resources", "resources", "{88EB1BC4-0D68-4906-AA36-E1EA1F6AFD35}"
ProjectSection(SolutionItems) = preProject
dotnet\resources\key.snk = dotnet\resources\key.snk
dotnet\resources\Neon.SSH.NET.dll = dotnet\resources\Neon.SSH.NET.dll
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityAPITestNetCore", "test\dotnetcore\SecurityAPITestNetCore\SecurityAPITestNetCore.csproj", "{27D2471A-DA98-4912-A327-AF135550B034}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -107,10 +106,10 @@ Global
{9100025A-68E0-4618-B83C-4D626CB89DBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9100025A-68E0-4618-B83C-4D626CB89DBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9100025A-68E0-4618-B83C-4D626CB89DBB}.Release|Any CPU.Build.0 = Release|Any CPU
{44B8B2B6-0842-4018-A547-EF33920EFC8E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44B8B2B6-0842-4018-A547-EF33920EFC8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44B8B2B6-0842-4018-A547-EF33920EFC8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44B8B2B6-0842-4018-A547-EF33920EFC8E}.Release|Any CPU.Build.0 = Release|Any CPU
{27D2471A-DA98-4912-A327-AF135550B034}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27D2471A-DA98-4912-A327-AF135550B034}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27D2471A-DA98-4912-A327-AF135550B034}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27D2471A-DA98-4912-A327-AF135550B034}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -133,8 +132,8 @@ Global
{89FFECB3-7A69-41F8-88C7-F05193E5CDF4} = {750343D3-EAA6-433E-A099-71BC6851EA71}
{7F5F1DDC-09BE-4567-8CD4-41387AD91BEE} = {750343D3-EAA6-433E-A099-71BC6851EA71}
{9100025A-68E0-4618-B83C-4D626CB89DBB} = {7F5F1DDC-09BE-4567-8CD4-41387AD91BEE}
{44B8B2B6-0842-4018-A547-EF33920EFC8E} = {89FFECB3-7A69-41F8-88C7-F05193E5CDF4}
{88EB1BC4-0D68-4906-AA36-E1EA1F6AFD35} = {5CB1725B-3FA5-49B1-A1F8-41EFCACA3CF1}
{27D2471A-DA98-4912-A327-AF135550B034} = {89FFECB3-7A69-41F8-88C7-F05193E5CDF4}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AEB1693D-906F-402A-AD66-A1A9AE2ABBE2}
Expand Down
Loading